This project was my contribution in “the micro:bit Mothers and Carers challenge”.
My mum likes flowers, but she has a lot to do, so it can be hard to remember to water them. My idea is to make a system that can look after the flowers.
I made a program for the micro:bit so it buzz when the flower needs more water, smiles when the soil is perfect, and looks sad when it have too much water.
I know that the electricity runs easily through wet soil but not so easy through dry soil, so I can measure the resistance in the soil. Then the micro:bit know if the soil is dry, wet or too wet, and it can tell mum when to water the flowers.
All you need is your micro:bit, a resistor (10 k ohm) and two nails. If you want to play sounds you can also connect a buzzer between p0 and gnd.
The easiest is to compare the resistance in the soil to a reference resistor like shown in the circuit. The voltage on p1 indicate how wet the soil is.
Make an endless loop, and use the commands below:
- Read analog pin 1 and put the value in to variable “soil”.
- Test value of variable “soil” and show a proper image.
- Test value of variable “soil” and play a sound on the buzzer.
Take care of the flowers, and make mum happy!