Hello Guys,
I would like to do a basic connection B/w ESP8266(ESP) and Arduino mega using following code but nothing reported on the SR monitor and AT commands running this codes are not responding too.I have tried bare minimum code and connecting RX to RX TX to TX which seems to and I can cee the AT command OK and AT+GMR
My reqirement is I have 2 Arduino megas and have 2 ESP8266 modules. I want to connect to 2 megas wirelessly to perform serial communication. So first step is that I want to connect Mega to esp next I will connect other mega to its respective Esp and then try making serial communication wirelessly between the 2 megas using esp modules.
I am open for advises, if there is an alternative approach without SoftwareSerial I am willing to try them.
I am using 3.3v power from Arduino as I have not created a seprate Power supply
But when I try to using softwareserial nothing shows up in the Seriam Monitor. I have checked wiring they looks good. I have tried several baud rates no luck, but When I click Send on Serial Monitor Blue ligt turn on for micro sec
Thanks in advance
STEP1 SETUP
Current connection is as follows:
TX(ESP)->PIN2(MEGA)
RX(ESP)->PIN3(MEGA)
#include <SoftwareSerial.h>
SoftwareSerial ESPSerial(2, 3); // RX, TX
void setup() {
// Open serial communications
Serial.begin(115200);
// set the data rate for the SoftwareSerial port
// if this doesnt work you for you then try different baud rate
ESPSerial.begin(115200);
ESPSerial.println("Ready to take AT commands");
}
void loop() { // run over and over
if (ESPSerial.available()) {
// reads input from serial console and writes to esp8266
Serial.write(ESPSerial.read());
}
if (Serial.available()) {
// reads input from esp8266 and writes to serial console
ESPSerial.write(Serial.read());
}
}