viz. odpověď zde:
https://arduino.stackexchange.com/quest ... 3342#23342
EDIT: Tak v monitoru to ručně jde a teď proč to nejde odesílat v programu :/
Kód: Vybrat vše
Q⸮
E⸮⸮⸮'&K⸮⸮,0Q5*U$(H⸮eat⸮⸮ѹj5+֮⸮K⸮.805⸮Ղr⸮H(ըTQ⸮81
)asarik.cz
ERROR
ERROR
ERROR
Kód: Vybrat vše
#include <SoftwareSerial.h>
SoftwareSerial esp(10, 11); // RX, TX
void setup(){
Serial.begin(9600);
esp.begin(9600);
}
void printResponse() {
while (esp.available()) {
Serial.println(esp.readStringUntil('\n'));
}
}
void loop() {
esp.println("AT+UART_CUR=9600,8,1,0,0"); /* Projistotu jsem to tu dal a nepomohlo */
printResponse();
esp.println("AT+CIPSTART=\"TCP\",\"weatherstation.michalmasarik.cz\",80");
printResponse();
String cmd = "GET /index.php?s=data&lang=cs HTTP/1.1\r\nHost: weatherstation.michalmasarik.cz\r\n\r\n";
esp.println("AT+CIPSEND=" + String(cmd.length()));
printResponse();
esp.println(cmd);
printResponse();
esp.println("AT+CIPCLOSE");
printResponse();
if (esp.available())
Serial.write(esp.read());
if (Serial.available())
esp.write(Serial.read());
delay(20000);
}