Chat freely about anything...

User avatar
By laubia
#42825 Hello I'm new in the ESP8266 and need know how I can send AT command and show in arduino serial monitor the result. I use a CP2102 where I've the GND, TX and RX conected to ESP8266 and both power supply with 3.3V and GND. It's my code.

#include <SoftwareSerial.h>

SoftwareSerial esp8266Module(10,11); //RX, TX

void setup() {
Serial.begin(9600);
esp8266Module.begin(9600);
delay(10000);
}

void loop() {
Serial.println("starting...");

esp8266Module.println(F("AT"));
delay(5000);
if(esp8266Module.find("OK")) {
Serial.println("OK");
}
else {
Serial.println("ERROR");
}
}