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 "MakeCode.microbit.org" 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:

1_basic.png
Forever.png
10_Advanced.png
Screen Shot 2019-09-19 at 11.08.19 AM.pn
Screen Shot 2019-09-19 at 11.08.40 AM.pn
8_Variables.png
Screen Shot 2019-06-25 at 2.29.31 PM.png
Screen Shot 2019-09-19 at 11.07.52 AM.pn
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:

7_Logic.png
If.png
2_Input.png
1_basic.png
show number.png
8_Variables.png
Screen Shot 2019-09-19 at 11.07.52 AM.pn
Screen Shot 2019-09-19 at 11.20.44 AM.pn
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:

8_Variables.png
Screen Shot 2019-09-19 at 11.07.52 AM.pn
4_LED.png
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