top of page

Test Soil Moisture With Your micro:bit

Program your micro:bit so you can use it to test if your plant has enough water. Elements in the soil are conductive. Conductors allow electricity to flow through them. Water in the soil makes them more conductive, so when the micro:bit detects more electricity it means there is more water.

New project.png

1 - Start a new project in MakeCode

Go to "" to start a new project by clicking the new project icon above. Click the purple plus box labeled "New Project" to begin.

2 - Receive a reading from the nail. 

Program your micro:bit to get the amount of electricity detected by the nail in the soil. Try these blocks:

Screen Shot 2019-09-19 at 11.08.19
Screen Shot 2019-09-19 at 11.08.40
Screen Shot 2019-06-25 at 2.29.31 PM.png
Screen Shot 2019-09-19 at 11.07.52
Need Help_ Heres a Tip.png

3 - Display the reading. 

Program your micro:bit to show the reading of electricity when you press the "A" button. Try these blocks:

show number.png
Screen Shot 2019-09-19 at 11.07.52
Screen Shot 2019-09-19 at 11.20.44
Need Help_ Heres a Tip.png

4 - Graph it! 

Program your micro:bit to graph the reading it receives from the nail. The conductivity will be around 1023 for wet dirt and about 200 for dry dirt. Try these blocks:

Screen Shot 2019-09-19 at 11.07.52
Screen Shot 2019-09-19 at 1.26.56 PM.png
Need Help_ Heres a Tip.png

Hooray! You did it! 

Connect alligator clips to the  "0" and "3V" pins on your micro:bit, then connect those to nails in the soil. 

If you need help, click me to see the finished product!

Mango Moisture.png
bottom of page