Hello guys, I can't communicate with my ESP8266, I can power it on but it doesn't respond AT commands and in exemples it says "Wifi shield not present", I read many posts and tutorials, but didn't find the answer.
Notes:
I'm using ATMega board; I tried to invert RX and TX pins, it didn't work; I tried to change from 0,1 pin to 2,3 and to RX1,TX1 pin; If I send a high output signal to pin 2, the blue led from ESP8266 goes on; I tried to start it with 9600 rate 19200 and 115200; The red led is always on (that means it's on); The blue led doesn't blinks; The only difference beetwen this schematic from my wiring connection is that red and black wires are connected to the external power supply (with ground in common with my board) I'm using this ITEADLIB_Arduino_WeeESP8266 library After testing I changed from the archive "ESP8266.h" the word "// #define ESP8266_USE_SOFTWARE_SERIAL" to "#define ESP8266_USE_SOFTWARE_SERIAL"
I'm wiring my ESP8266 almost like this: (The exception is I'm using an external power supply)
Hbadotti:
I tried to invert RX and TX pins, it didn't work;
In the picture, you have Rx,Tx the wrong way round. There is only one right way, this isn't it, and don't expect anything to work until you fix it. It may indeed have not worked with the wiring the other way round but the wiring was not the cause of the problem.
I don't know what this
After testing I changed from the archive "ESP8266.h" the word "// #define ESP8266_USE_SOFTWARE_SERIAL" to "#define ESP8266_USE_SOFTWARE_SERIAL"
is about, but your module is connected to hardware serial, and any code you have relating to esp8266 and software serial is wrong.
I guess the first thing you need to do is make up your mind whether to use software or proper hardware serial. I'm not sure what board you are using. The picture shows a Uno. If you are actually using a Mega, I bet you have no good reason for using software serial.
First of all, I'm really sorry for my bad english and my bad knowlodge about arduino
pert:
Yet you have the ESP8266 connected to the hardware serial pins.
And what that means? Should I remove the "//" or keep them?
Nick_Pyner:
In the picture, you have Rx,Tx the wrong way round. There is only one right way, this isn't it, and don't expect anything to work until you fix it. It may indeed have not worked with the wiring the other way round but the wiring was not the cause of the problem.
I don't know what thisis about, but your module is connected to hardware serial, and any code you have relating to esp8266 and software serial is wrong.
I guess the first thing you need to do is make up your mind whether to use software or proper hardware serial. I'm not sure what board you are using. The picture shows a Uno. If you are actually using a Mega, I bet you have no good reason for using software serial.
The picture is wrong, I changed it, now my wiring is exacly like the picture (I mean RX and TX wires, because GND and VCC are connected in my external power supply)
My board is a ATMega and what you mean with "I bet you have no good reason for using software serial."?
IF you are using the proper hardware serial pins 0,1, get rid of all code referring to software serial. Don't bother with "//" just get rid of it and stop confusing everybody, including yourself.
If you are using external power supply, it should not be a problem so long as the grounds are connected. I assume you are doing this because of the limited 3.3v supply. There is plenty of information around here about external power. One common approach with the ESZP8266 is to use a 3.3v regular from Arduino's 5v pin.
I'm afraid I don't know what an ATMega is. If you really mean an Arduino Mega, it has four (4) hardware serial ports, which should be enough, and hence my comment. Using software serial is never a good idea, no matter what Arduino you are using, and using it with a Mega is a particularly bad idea.
Nick_Pyner:
IF you are using the proper hardware serial pins 0,1, get rid of all code referring to software serial. Don't bother with "//" just get rid of it and stop confusing everybody, including yourself.
If you are using external power supply, it should not be a problem so long as the grounds are connected. I assume you are doing this because of the limited 3.3v supply. There is plenty of information around here about external power. One common approach with the ESZP8266 is to use a 3.3v regular from Arduino's 5v pin.
I'm afraid I don't know what an ATMega is. If you really mean an Arduino Mega, it has four (4) hardware serial ports, which should be enough, and hence my comment. Using software serial is never a good idea, no matter what Arduino you are using, and using it with a Mega is a particularly bad idea.
My arduino is the Arduino Mega, it have 4 serial ports, so, the right thing to do is to use ports 0,1, right? I've used them but it still doesn't respond my AT commands...
Hbadotti:
My arduino is the Arduino Mega, it have 4 serial ports, so, the right thing to do is to use ports 0,1, right?
No. If you are sending AT commands, you are probably using the serial monitor. This shares with Serial0 (pins 0,1). In that event, you put the module on one of the other ports, and adjust the code accordingly. Indeed, I submit that pins 0,1 is the last choice for any serial module, unless you are constrained by using a shield made for Uno. This is not a big deal, it's just more convenient.