- Mon Apr 13, 2015 2:03 pm
#14392
I got an ESP8266 module and after upgrading its firmware with the arduino IDE (burn bootloader) I connected it successfully to an arduino uno 3 using the following sketch:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);
void setup() {
// put your setup code here, to run once:
mySerial.begin(115200);
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
I am able to send AT commands from serial successfully through the arduino to the module and get the output.
When I try to do the same with an arduino nano, connecting it to pins D2 and D3 with the same sketch, it doesn't work. I am using the same power for the wifi module (external from the arduino's) and just move the 2 RX,TX pins from the uno to the nano.
When I try to send any command, the serial light in the nano blinks but not the ESP's one. It's like there is a communication problem between them.
I tried to upload the sketch to the nano with different speeds (9600 and 19200) and still the same behavior. If I power off/power on the ESP while the arduino serial monitor is open, I get funny looking characters and a short blue led blink and that's it.
Any ideas?