This is a Raspberry Pi project for a water level alarm. The project monitors the water level and sends an alert when the water level is too high or too low.
- Python version: 3
- Virtual environment (venv) for managing dependencies
- Operating System: Raspberry Pi OS
gpio wiring position
- Lower water level: gpio2 -> GND
- Upper water level: gpio3 -> GND
- Clone the project repository:
git clone https://github.com/wuchuhengtools/water_level_walam_gpio_python.git
cd raspberry-water-level-alarm- Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate- Install project dependencies
pip install -r requirements.txt- update requirements.txt
pip freeze > requirements.txtTo start the water level alarm, run the following command:
python3 src/main.pyTo execute tests for the project, use the following command:
python -m unittest discover testsIf you encounter any issues or have suggestions for improvements, please submit an issue on the project's GitHub repository. Be sure to include detailed information about the problem or feature request.
This project is open-source and is licensed under the MIT License. You can find the license details in the LICENSE file.