I used the code below to control an ESP8266. I am getting some unknown symbols in the responses.
#include <SoftwareSerial.h>
const byte rxPin=2;
const byte txPin=3;
SoftwareSerial ESP8266( rxPin, txPin);
void setup() {
Serial.begin(115200);
ESP8266.begin(115200);
delay(1000);
// put your setup code here, to run once:
}
void loop() {
Serial.println("sending an AT command");
ESP8266.println("AT");
delay(100);
while(ESP8266.available())
{
String inData = ESP8266.readStringUntil('\n');
Serial.println("Got Response:" + inData);
delay(1000);
ESP8266.println("AT+RST");
}
// put your main code here, to run repeatedly:
}
The unknown symbols are shown in the screen shot.
What might the problem be?