I have "arduino Mega2560" and "esp8266 lolin nodemcu v3" and I've connected:
esp -> arduino
3v -> 3.3v
G -> Gnd
Tx -> digital port 2
Rx -> digital port 3
https://www.photobox.co.uk/my/photo/ful ... 1663183097
And below u can see the code that I've uploaded on arduino:
#include <SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup()
{
Serial.begin(115200);
esp8266.begin(115200);
}
void loop()
{delay(1000);
esp8266.println("AT");
if(esp8266.available()) // check if the esp is sending a message
{Serial.print("lool");
while(esp8266.available())
{
// The esp has data so display its output to the serial window
char c = esp8266.read(); // read the next character.
Serial.write(c);
}
}
}
But I can't see anything in serial monitor of arduino.
Whats the problem?!
Any help appreciated.