Explore the world of programming, circuit design, logic building and algorithm design by doing the microbit compatible MoonGarden project.
Key Features
Hands-on experience
Learn coding
Learn electronics
Enhance cognitive development
Project- Smart Soil Moisture Sensing
The project requires following item.
BBC Microbit and its cable
Soil moisture sensor
LED pole
Connecting wires
Seedling pots with soil to test
Let’s Start
Step1: Connecting Soil Moisture Sensor
Use a wire and connect one end to any pin of GND header in Microbit breakout board. Connect the other end with GND pin of soil moisture sensor.
Repeat the step for 2 more connections.
Microbit Breakout Board
Soil Moisture Sensor
3.3v
VCC
GND
GND
P0
AO
Step2: Connecting LED pole
Use a wire and connect one end to any pin of GND header in Microbit breakout board. Connect the other end with GND pin of LED pole.
Repeat the step for 3 more connections.
Microbit Breakout Board
LED Pole
P13
R
P14
Y
P15
G
GND
GND
Step3: Programming
The code monitors the presence of moisture in soil and turns on the appropriate LED to indicate the level. It also utilizes the LED matrix display of microbit to show different facial expressions according to the moisture level.
Blocks in MakeCode
NOTE: The values (900, 950) used for comparison in code depends on for which level of soil moisture an alert is required. These should be changed accordingly.