1

I'm working on a IOT project where three or more IOT device communicates with a web server. The IoT device will have Arduino UNO which is connected to a ESP8266 so internet access is available. Arduino UNO reads current sensor data and post it to a website that I built and I also want to control a single relay switch from the same website. I am a beginner and most project I find is only single directional communication or making ESP8266 as web server. Please point me to right Direction.

I was able to post sensor data to thingspeak.com. I was also able to control The relay switch from a website but only separately. I was not able to make it work when I combined the two.

Directions:

  1. How to build web APIS to send and receive data to Arduino UNO via esp8266?
  2. How to send data and check the received data in Arduino UNO VIA esp8266?
  3. Can I send and receive data in JSON format Arduino UNO?
  4. How can the Arduino UNO filter required data from the received json?
  5. Is this project possible without Arduino and just by programming the ESP8266 module?

I know basic HTML, Basic CSS, Basic JavaScript, Basic Nodejs, json and a tiny bit of JQuery.

1 Answers1

2

Is this project possible without Arduino and just by programming the ESP8266 module?

Yes if you use ESP-12 or an esp8266 dev board like Wemos or NodeMCU. The problem could be the current sensor. I would recommend to read it with I2C ADC module, because the esp8266 A0 can read only to 1 V and is shared with WiFi functions. Wemos boards use a circuit to read analog until 3.3 V, but it doesn't help much.

How to build web APIS to send and receive data to Arduino UNO via esp8266?

Run your Web server in Internet and let the esp8266 and clients communicate over it. But think about security.

For accessing a Web server from Arduino or esp8266 see the WebClient example of networking libraries.

How to send data and check the received data in Arduino UNO VIA esp8266?

For Arduino with esp8266 as network adapter connected to Serial you can use AT firmware in esp8266 and WiFiEsp library in Arduino. Or you can have a sketch for the esp8266 with Arduino esp8266 core package and your own protocol over Serial to communicate between esp8266 and Uno. And there are firmwares for esp8266 written as esp8266 sketch, which you can use with corresponding Arduino library (WiFiLink, WiFiSpi).

Can I send and receive data in JSON format Arduino UNO? How can the Arduino UNO filter required data from the received json?

ArduinoJson library helps with processing the JSON format. Amount of RAM could be a problem on Uno.

Juraj
  • 18,208
  • 4
  • 30
  • 49