0

My question: I don't know how to connect ULTRASONIC SENSOR(hc-sr04) which is for getting the fill level of garbage and DHT11 for temperature and humidity to connect both in a ESP8266 to mobile application that I am developing.

I should provide three devices,that are located far from each other with breadboard and battery with case holder. Will be connected through wifi, and send notification to the mobile app to maintenance person.

1 Answers1

1

There are many solutions to this project. Also, while the DHT11 sensor is well defined, simply saying "Ultrasonic sensor" is not. So only the DHT11 and Raspberry Pi will be included in this answer.

One approach would be to use an ESP8266 WiFi based board to interface with the DHT11 and transmit data over WIFI to the Raspberry Pi. Here is one of many project published on the internet where this is done.

If you are going to run the ESP8266 boards on batteries, it would be best to study the deep sleep capabilities of the ESP8266. This github.com repository contains some code examples.

Finally, you might consider MQTT as a way to transfer data from the ESP8266 devices to the Rraspberry Pi. Here is one of many examples on the internet regarding MQTT between an ESP8266 and a Raspberry Pi.

st2000
  • 539
  • 2
  • 7