Basically, I am using 5 parts and a few meters of water hose:
- A I2C soil moisture sensor
- A Particle Core
- A water flow meter
- An USB submersible water pump
- An USB power switch (Mosfet, Relay, Integrated switch IC, ...)
The program (at the time of writing, version is 1.0.0 ) does some kind of trivial task:
1) Initialize the hardware
2) Wait some time
3) Proceed to a moisture measurement
4) if moisture under threshold, goto 2), else goto 5)
5) Turn the pump ON, wait until the desired quantity of water has been watered AND check that timeout did not happen
6) Turn the pump OFF, goto 2)