This is a simple Flask based RestApi for driving the arduino remotely.
The project is ready to run as is. You will need Python 3.4 or later.
After cloning or downloading the repo, create a Python virtual environment with:
cd restapi
python -m venv .virtualenv
Now activate the virtual environment. on macOS, Linux and Unix systems, use:
source .virtualenv/bin/activate
On Windows:
.virtualenv\Scripts\activate.bat
Now run:
pip install -e .[dev]
This will install the packages the project depends on in production as well as packages needed during development.
Auto water sprinkler project for my back yard
- Raspberry pi
- Arduino
- Hose pipes
- T-pipe(optional)
- Solenoid valve(normally open)
- Raspberry pi 433mhz transmitter
- Arduino 433mhz reciever
- Connector pipes
- Tap valve
- Hose connector
- Relay
Download sprinklercontroller.ino and ???.py and upload respectively to Arduino and Raspberry pi. After installing these you should be ready to go.
Install the Solenoid valve and T-pipe to water source (T-pipe only required if you still want to use original tap). Then connect hose adapter and hose pipe before creating a sprinkler system around the needed parts of the garden. Connect switch to Solenoid valve and power supply. Now the sprinkler system should be working, test by switching the switch on.
If you only require the sprinkler system without pi automation you can stop here.
- Connect ATAD pin on 433mhz transmitter to 5V GPIO
- Connect VCC pin on 433mhz transmitter to GPIO pin 17
- Connect GND pin on 433mhz transmitter to GND GPIO
- Connect 5V pin on 433mhz reciever to 5V GPIO
- Connect OUT pin on 433mhz reciever to GPIO 7
- Connect GND pin on 433mhz reciever to GND GPIO
Upload sprinklercontroller.ino to Arduino. Upload ???.py to Raspberry Pi and run to turn on sprinkler system, run ???.py again to turn off sprinkler system.
finished picture of arduino(White casing optional)
finished picture of Raspberry Pi