Lesson 5 SDG - Life on Land: Code & Test a Composting Tumbler
Recap:
In the last class, we learned how humidity affects composting efficiency and designed an automatic compost bin with humidity control. Today, we’re building a smart compost prototype that automatically mixes compost when it gets too wet, keeping it healthy and working fast.
Today’s focus: Connect → Program → Test
1. Engineer: Hardware connection
Let’s build our composting prototype first!
Activity 1
Guide students to make hardware connections following the displayed diagram:

2. Experience-Challenge: Program to create a composting prototype
Let’s find out the reading of humidity level!
Activity 2
Upload the pre-written starter code onto your UNIHIKER K10. The code reads the moisture sensor value and displays it on the screen.


Test it: Cover a wet tissue on the moisture sensor to simulate wet compost.
Key Question
What happens to the sensor value? (It jumps up!)
Now let’s code our prototype to solve a real compost problem: When compost is too wet (over 60% moisture), it gets smelly and breaks down slowly. Our motor will mix it to add air and dry it out.
Activity 3
Modify the code to activate the motor when moisture is too high:
Students need to wrap the blocks in a loop forever block. The starter program will only check the value of humidity once, right when the program is started.


3. Debug & Test: Adjust the Mixing Speed
Let’s make sure our prototype works perfectly for real compost!
Key Question
Is the motor spinning too fast (splashing "compost" everywhere) or too slow (not mixing well)?
Activity 4
Adjust the speed value to something other than 255.
Encourage students to play around with the values in the set motor block. Here are some possible adjustments:
If speed = 0, the motor will always stop because the speed of motor is always 0.
Note: If the motor does not start, first check your speed value. Values below 100 may not drive the motor.
4. Decorate & Share: Assemble backdrop and composting prototype, and explain program logic
Let’s turn our prototype with the backdrop and share why composting matters for land life!
Activity 5
Assemble your compost bin model with the motor and sensor. Add fake food scraps, leaves, or toy worms to make it look like real compost.
Attach a garden backdrop (draw or use stickers of growing plants) to show how compost helps land life thrive.

Each group gives a 2-minute presentation:
Demo: Spray water on the sensor to trigger mixing, then let it dry to show the motor stops.
Explain & Advocate: "Our code starts the motor when compost is too wet to keep it healthy. Composting reduces waste and feeds plants—let’s start composting at home to protect our soil and land creatures!"
5. Extension: Other Ways to Protect Land Environments
Key Question
Composting is awesome, but what else can we do to keep our land and soil healthy?
Brainstorm with your group! Here are some ideas to start:
Plant Trees: Trees hold soil in place and provide homes for animals.
Reduce Plastic: Plastic pollutes soil and harms creatures like earthworms.
Natural Pest Control: Use ladybugs or neem oil instead of chemical pesticides that damage soil.
Crop Rotation: Farmers can switch crops each year to keep soil nutrients balanced.
Challenge: Pick one idea and create a 1-minute pitch for how we can do it at school or home!







