-->
Page 1 of 1

Serial Communication not working using the Arduino Due

PostPosted: Sat Nov 01, 2014 11:10 pm
by Busti
Hello,

I tried using the Due's serial ports (pin 0/1) since its the only 3.3V serial "converter" I own. But no matter how I connect the esp8266 I won't get any serial data. I have the RX / TX connected to the TX / RX pins on the Due and it is getting powered by the dues 3.3V pin. When I connect it without having the CH_PD pin on 3.3V the blue LED flashes once when it is connected it flashes twice. It also flashes when I send serial data. I also checked every baud rate (I got the newer one) and multiple different Serial monitors. I also tried connecting GPIO-0 / all pins to 3.3V with the same result.
(It is also not damaged since I ordered 10)

Do I have to install the firmware first before it does anything?

Please Help

- Busti

Re: Serial Communication not working using the Arduino Due

PostPosted: Tue Nov 11, 2014 5:38 am
by diywizard
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...

Re: Serial Communication not working using the Arduino Due

PostPosted: Thu Sep 17, 2015 4:56 am
by Ravi Dhoble
also am using Arduino IDE 1.6.5 on Win64.. there is problem with "esptool" after installing ESP8266 lib from github. so is it possible to make serial communication with esp without esptool? can we use other programmer from tools--->programmer?