- Tue Nov 11, 2014 5:38 am
#2466
Since rx0 and tx0 is the "echo" of the communication between arduino due and atmega16u2. You can't use it for talking with esp8266, instead, I've use the following method.
I have bridged the arduino due's rx0-tx0 connection to one of other serial paires (rx1-tx1, rx2-tx2, rx3-tx3 and so on) by using due, for example I choose rx1-tx1 and connect rx1-tx1 to esp8266's rx-tx (i own an esp-01) like usual way.
Firstly upload the code that do the bridge job and below is my simple example:
Code: Select allvoid setup()
{
pinMode(13, OUTPUT);
digitalWrite(13, LOW); // to turn the led off
Serial.begin(115200); // from Due to PC connection (maybe 57600)
Serial1.begin(115200); // from esp-01 to Due connection (maybe 57600)
}
void loop()
{
if (Serial1.available())
Serial.write(Serial1.read());
if (Serial.available())
Serial1.write(Serial.read());
delayMicrosecons(1000); // feel free to adjust this or remove it to suit your need! (spin delay).
}
Secondly, make sure your esp-01 connection is connected as i told you above but no connection for CH_PD yet then open arduino ide's serial monitor and set buadrate to 115200 with cr&lf enabled (you may try 57600 if this buadrate is not working). Now if you are ready to see some greeting of esp8266 then connect 3.3vcc to CH_PD pin and you should see some garbage and "ready" message. After this you can try to issue AT+RST or some other commands and see how it respond to the command, good luck.
If these are not clarify enough i may shot some picture or video for you on how to do if you want to, just let me know...