I have connected my arduinoArduino with esp8266an ESP8266.
When I check esp8266the ESP8266, by manually entering commands at serial monitor i, I get correct results.
ButHowever, when I run this program
#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
Serial.setTimeout(5000);
Serial.begin(115200);
esp8266.begin(115200);
delay(1000);
}
void loop() {
delay(2000);
String command="AT";
esp8266.println(command);
if(esp8266.available())
{
while(esp8266.available())
{
char c=esp8266.read();
Serial.write(c);
}
}
}
I get garbage values where sometimes it has OK inbetween it.an OK in between the output:
" Received: "ÁT OK " Received: "AÔ ÏË " Received: "AÔ OK " Received: "ÁT ÏË " Received: "ÁT OË " Received: "ÁÔ OK " Received: "Á¬ OK " Received: "ÁT OË "
Could someone help me?