ThingSpeak Communication Library for Arduino with ESP8266

4 views (last 30 days)
Mahmoud Al-Quzwini
Mahmoud Al-Quzwini on 4 Mar 2021
I couldn't find information which Arduino pins are defined by your library to connect to RX and TX pins of ESP8266? I am using ESP8266 breakout (ESP-01).
  1 Comment
Mahmoud Al-Quzwini
Mahmoud Al-Quzwini on 5 Mar 2021
Hi Christopher,
Thanks for your reply. However I was asking about the pins used from the Arduino Uno side. Sorry if my orginal question was not clear.

Sign in to comment.

Answers (1)

Christopher Stapels
Christopher Stapels on 5 Mar 2021
Those pins would be defined by your board properties, not by the ThingSpeak library. It seems that the standard is GPIO1 (TX) and GPIO3 (RX) for the ESP8266.
Christopher Stapels
Christopher Stapels on 5 Mar 2021
I would suggest programming the ESP8266 directly instead of using it to communicate with the UNO. Occasionally this is not possible though due to the linmited I/O on some ESP models, or due to the difficulty of changing pre existing hardware.
If you are set with using the ESP as an intemediary, you can use the D1 and D0 pins on the UNO. In the WriteMultipleFields.ino example in the library, you will see this table in the top of the file:
ESP8266 | Arduino without Serial1 | Arduino with Serial1
RX | pin 7 | TX1
TX | pin 6 | RX1
VCC | 5V | 5V
CH_PD | 5V | 5V
Since the UNO has serial, you should use D1 for TX , which connects to ESP RX and D0 RX to connect to ESP TX.
Sorry for the confusion on the answer versus the comment. I erased my original comment and added it as an answer. You might want to remove your comment above (but keep the one in the answer section) to make the thread easier to read. Thanks!

Sign in to comment.


More Answers in the  ThingSpeak Community

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!