Micro:bit Physical computing guides
No. 6: Moisture sensors
Connecting a Moisture sensor to a micro:bit
Instructions on how to attach a moisture motion sensor to a BBC micro:bit.
What you will need
Instructions on how to attach a moisture motion sensor to a BBC micro:bit.
What you will need
- BBC micro:bit
- Micro USB cable
- Battery pack with 2 x AAA batteries
- 1 x moisture sensor
- 3 x Crocodile clip leads
Understanding moisture sensors
A moisture sensor module measures the amount of water in soil by passing an electric current through two prongs and measuring the resistance.
A moisture sensor module measures the amount of water in soil by passing an electric current through two prongs and measuring the resistance.
Moisture sensor
Wiring instructions
- Disconnect the micro:bit from your computer and disconnect the battery pack.
- Using crocodile clips, connect the left leg of the sensor (S or Sig) to Pin 0, the middle leg to 3V, and the right leg to GND on the BBC micro:bit.
Programming your Temperature sensor
Copy the below:
Programming your Temperature sensor
Copy the below:
Testing your code
Testing your code
- Download your program to your micro:bit.
- Reconnect your battery and run your program.
DIY Moisture Sensor
A soil moisture sensor built with nails and a micro:bit