- Raspberry Pi model 3 Ver. B (Amazon)
- Prototype Hat shield for Raspberry Pi (Amazon)
- Bi-Directional Logic Level Converter (Sparkfun)
- I2C OLED Module 12864 (Amazon)
- YF-S201 1-30L/min Hall Effect Water Flow Meter (Amazon)
- Male Pin Headers
- Patch Wire
- Solder
- django - Web interface and ORM for database
- wiringpi (more specifically the Python wrapper) - Capture data from the flow sensor via GPIO
- Adafruid_SSD1306 - Control OLED display via I2C.
- Before starting up the flow server for the first time, navigate to the flow_server directory and run :
This will initialize the sqlite3 database. It only needs to be run once.
$ python3 manage.py migrate
- Using your favorite text editor, edit line 4 of flow_server/spinUp.py to match the ip address of your RPi.
- To start the program, ensure you are still in the flow_server directory and run:
$ python3 spinUp.py
http://[ip_address]:[port]/display_flow/minute/
- Main process measures and records flow data from one or two flow sensors
- Main process pushes data to a child process for database logging every 5 seconds
- Separate process updates the OLED with current flow rate and maximum flow rate
- Web sever displays current flow rate, as well as dynamically generated graphs for historical flow rates (for past minute, hour, day, and week) and the maximum flow rate over the selected interval
- Allow custom settings for flow rate parameters through web server
- Create an alert if flow goes over a threshold value (set via web server)
- Pretty up the web interface