The is the firmware to support a plant monitoring and watering system.
Breadboard diagram:
The image below demonstrates the circuit in as a prototype on a breadbaord suitable for testing.
The circuit transferred to a permanent PCB (re-arranged to utilize space).