Soil Moisture Sensor¶

Description |
Detects the amount of moisture present in the soil surrounding it. Most often used to determine when a plant needs water. NOTE: The anode electrode will corrode with extended use. |
Usage |
Detects the conductivity between the two probes. Reads a raw analog moisture level as a variable resistance. With micro:bit ADC input this would range from 0 to 1023. |
Voltage Range |
3.3 - 5V |
Interface Type |
Analog Input |
Example Usage |
from microbit import *
while True:
moisture_val = pin0.read_analog()
if moisture_val > 300:
# plant has plenty of water
# ...do something
else:
# plant needs water
# ...do something
|