SMART RAIN BARREL WITH RASPBERRY PI
by jonasoosterlinck in Circuits > Raspberry Pi
539 Views, 5 Favorites, 0 Comments
SMART RAIN BARREL WITH RASPBERRY PI
![20210526_171044.jpg](/proxy/?url=https://content.instructables.com/F7U/W4FD/KPX8YP33/F7UW4FDKPX8YP33.jpg&filename=20210526_171044.jpg)
A device that knows how much water is in the barrel + checks the temperature of the water!
Supplies
- rain barrel
- hc-04 ultrasonic sensor
- temperature sensor
- lcd 2X16
- cabels
- rasberry pi 4
Connecting the Sensors to the Pi
![Capture.PNG](/proxy/?url=https://content.instructables.com/FZP/R6PC/KPX8YP22/FZPR6PCKPX8YP22.png&filename=Capture.PNG)
!!!! temp sensor on 3.3V
!!!! hc-04 on 5V
Connect to the Pi With Visual Studio Code
Explaining the Code
![Capturess.PNG](/proxy/?url=https://content.instructables.com/FVV/3NSS/KPX8YP5F/FVV3NSSKPX8YP5F.png&filename=Capturess.PNG)
- we need to create a formula to calculate the amount of water in the barrel with the height of the water.
- we want to see the temperature so we need to activate the bus in the config of the pi!
- we want to send al the information to the LCD display!