Micro:bit moisture detector

Admit it.

You've let a house plant die through neglect before. Probably not even just the once. Multiple times over. You are a bad house plant parent, but things could change around if you had one of these.

My micro:bit water sensor showing animated "don't water me".

The micro:bit water sensor connects to your micro:bit through the pins provided at the bottom of your device. Black to ground; red to 3V and the blue to whichever pin (0-2) you wish to read.

My first project is a simple soil-moisture detector for a houseplant.  When the moisture level is okay for the plant then the micro:bit displays an animated cross ("do not water"); when the soil is dry then the micro:bit displays animated drops of rain ("water me").

Very simple.

Feel free to get my code.

Here I am continually reading the analog pin (P2) and storing the value in a variable called 'water'. I found that a value less than 10 means 'bone dry'.

The micro:bit in the emulator showing the animated rain drops.
Future expansion of the project will be to connect the micro:bit to a water pump so that the system can automatically water the plant as well.  It might also be useful to store the time taken to dry up, or audible warnings if the soil is completely bone dry: Yes, you can get a headphones adapter for the micro:bit as well.

The water sensor is a fun addition to the micro:bit computer and there are clearly multiple fun projects to attempt. You can get your water sensor here.