Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By Stefan570
#18817 Hi everyone,
I've searched a long time but didn't find a answer, so sorry if I have overseen something :roll:
Is it possible to send e.g. six analog values from Arduino AnalogIn via RX/TX to ESP-01 and send these values to a database with http GET?
I want do send more values than GPIOs available on the ESP...
How should the Module be connected to the Arduino (MEGA)?
If it is possible, what is the max. number of analog values to be send?

Thanks in advance,
Stefan
User avatar
By tytower
#18933 Not my area really but wouldn't you get the values on an arduino and transmit them via serial on the TX RX lines to the WI Fi and then broadcast those by POST's to your chosen web site one at a time or in batches . I'm probably not understanding something basic here so please explain more.
User avatar
By Stefan570
#21233 I want to know whether it is possible to send six or more analog values from Arduino Mega 2560 AnalogIn via Serial1 to the ESP-01 and post this data via HTTP to a server for displaying these values. it would be great if the refreshing rate would be high ( 50 ms would be awesome)
Thingspeak would be nice, but the delay of 15 seconds is too higt for posting my datas.

Another Problem: I can't use LUA-Firmware - what are the AT-commands for reading an analog value on GPIO2?

I have wired the ESP to the Serial1 at the Arduino and the communication does work via AT-commands.
User avatar
By costo
#21266 Using AT commands is uncomfortable.
The ESP-Arduino IDE has the ESP8266WiFi.h library, a straightforward library. So much simpler and faster than using AT commands.
b.t.w there is no AT command for reading the ADC in the ESP. The internal ADC of the ESP is not accurate and not very usable at the moment. (Maybe in a future ESP-firmware this is better)

I would recommand using the ESP for all the WiFi related stuff, no AT commands.
For the Analog/Digital part, either you use some sort of add-on I2C multiple A/D converter (see this video: https://www.youtube.com/watch?v=EWpr3fpNz88) or something like this board: http://www.ebay.com/itm/ADS1115-Module- ... 5d595e0ac8 and run the complete program exclusively in the ESP. (Do need for an Mega2560 anymore)

or use a Arduino-board only for reading the analog inputs and sent the values direct to the ESP by Serial or use the arduino-board as I2C slave. see this tutorial, where a ESP8266 must be used as I2C master and the Arduino as I2C slave.