9.Soil Moisture Alarm
##Case Description
Designed for agricultural soil to prevent crop mold and decay caused by prolonged high soil moisture. This device acts like a night watchman. The sensor part of the device is inserted into the soil, and when excessively high soil moisture is detected, it drives a servo to strike a "gong disc."
###Key Knowledge Points
- How to use the Sugar soil moisture sensor
##Case Implementation
###Structural Assembly
###Circuit Connection
Connect the soil moisture sensor to the Robotbit P1 terminal block.
###Programming 1、Since the project uses a servo, the program needs to initialize the expansion board at the beginning and set the initial servo angle.
2、Map the soil moisture range to a specific value of 100~0.
3、The Micro:bit LED matrix displays different numbers of lit dots based on the moisture level.
4、Continuously monitor soil moisture. When the value exceeds or falls below a certain threshold, trigger the "night watchman" alert.
