ESP8266 with ultrasonic sensor
Budget: $10 – $30 USD
I have 4 HC-SR04 sensors each connected to an esp8266. Via wifi the Esp8266 are connected to a Raspberry PI on which the RTC DS3231 is installed.
I want to create a script for ESP8266 that based on time activates only one sensor at a time so that the trigger of one is not received as an echo from another to avoid interference.
For example, every minute each sensor is triggered at an interval of 5 seconds from each other (e.g. Sensor1 sec 5, Sensor2 sec 10, Sensor3 sec15, Sensor4 sec20, Sensor1 sec 25, etc.). The measured distances must be sent to an MQTT server installed on the Raspberry. A python file is also installed on the Raspberry that plays some video if the distance . I can provide the python file.
Translated with www.DeepL.com/Translator (free version)
I want to create a script for ESP8266 that based on time activates only one sensor at a time so that the trigger of one is not received as an echo from another to avoid interference.
For example, every minute each sensor is triggered at an interval of 5 seconds from each other (e.g. Sensor1 sec 5, Sensor2 sec 10, Sensor3 sec15, Sensor4 sec20, Sensor1 sec 25, etc.). The measured distances must be sent to an MQTT server installed on the Raspberry. A python file is also installed on the Raspberry that plays some video if the distance . I can provide the python file.
Translated with www.DeepL.com/Translator (free version)