-->
Page 1 of 2

Use UART to send/receive data to Arduino?

PostPosted: Mon Jun 29, 2015 7:07 am
by aldo.myrtaj
Hello there,

I am trying to implement a connection between the ESP8266 flashed with the new ARDUINO IDE and an Arduino UNO. I need the Arduino UNO to communicate with the ESP 8266 and because I read from the ARDUINO IDE documentation on GitHub that:
Serial object works much the same way as on a regular Arduino. Apart from hardware FIFO (128 bytes for TX and RX) HardwareSerial has additional 256-byte TX and RX buffers. Both transmit and receive is interrupt-driven. Write and read functions only block the sketch execution when the respective FIFO/buffers are full/empty.
I thought of trying to connect both of these devices using the method described in this website: http://www.billporter.info/2011/05/30/easytransfer-arduino-library/

By far I have had no luck to make this work (even though it seems easy). I would be grateful if some of you could give me some feedback or even suggest me a new way to connect these 2 devices. I would love to connect them through I2C but unfortunately the Arduino IDE does not support a slave mode for the ESP8226 yet :?

Re: Use UART to send/receive data to Arduino?

PostPosted: Tue Jun 30, 2015 1:31 am
by tytower
Out of interest I had a look at your link site and tried an example on just one ESP8266 ESP12
Uploaded OK but looking at the serial output it was not readable at any baud rate I could find .

Just happens that the device I used has an LED on pin 13 so I put the receive and transmit programs on one after the other and had garbage out on TX and nothing on the RX. Don't think that will help you but I seem to remember an example where an Arduino was connected to an ESP8266 via RX/TX lines and there was no crossover of lines .Perhaps you could try that for clues with your serial cable in the Arduino.

There was though obvious transmission of data as evidenced by the blue LED flashing and the red LED I have connected to pin 13 flashed sometimes 4 ,then 3 and 2 and at different intervals.

Re: Use UART to send/receive data to Arduino?

PostPosted: Tue Jun 30, 2015 3:14 am
by AcmeUK
Hi Tytower

Did you try 74880 baud rate?

Re: Use UART to send/receive data to Arduino?

PostPosted: Tue Jun 30, 2015 3:34 am
by tytower
Yes I did I fired up putty as that's the only way I can see that baud rate. Still nothing .
My sketch was the TX program and as that sends some randomised number for blink and pause I would say the LED is doing what it should . Only the serial output is strange.

I also uploaded the rx program but that has no output until it gets data from the TX so I didn't expect to see anything there . So Ill sit down and work out what I can do to put the RX program on an arduino and the TX on ESP