Hi I am new to arduino development i was using esp8266 using software serial library
here is the code
#include<stdlib.h>
#include <SoftwareSerial.h>
SoftwareSerial monitor(2, 3); // RX, TX
void setup()
{
monitor.begin(9600);
Serial.begin(9600);
sendDebug("AT");
delay(5000);
Serial.println("Hello");
if(monitor.find("OK"))
{
Serial.println(monitor.available());
Serial.println((int)monitor.read());
Serial.println((int)monitor.read());
Serial.println(monitor.available());
Serial.println("RECEIVED: OK");
//connectWiFi();
}
else
{
Serial.println("RECEIVED: None");
}
}
void loop(){
}
void sendDebug(String cmd){
monitor.println(cmd);
Serial.println("Command: "+cmd);
}
Output
Command: AT
Hello
2
13
10
0
RECEIVED: OK
All I know is monitor.available()
return the available bytes that can be read and i can also deduce that these two bytes are O and K but the integer value doesn't corresponds to the ascii value of O and K
can anyone explain what is actually getting printed on the serial monitor what is 13 and 10 ? ??