Coral Reef Kit (micro:bit) - Lesson5

Lesson 5 SDG - Life Below Water: Code & Test a Coral Bleaching Model


Recap:


In the last class, we learned what coral bleaching is and built a coral model with building blocks.In today’s class, we will continue to improve this model.

Today’s focus: Connect → Program → Test → Advocate

 

1.Engineer: Hardware Connection


Let’s build our coral bleaching simulator first! Each group will receive:
(1)micro:bit with expansion board
(2)Waterproof Temperature sensor
(3)LED strip (attached to your coral block model)


Activity 1
Guide students make the hardware connections by following the diagram.
Connection diagram:

2.Experience-Challenge: Program to create a coral bleaching model


Now let’s bring our coral model to life with code!


Activity 2
Import and download the starter project.

Hold the temperature sensor in your hand for 10 seconds and observe the color change.

 

Key question
What do you notice?(The LED strip suddenly changes to bright white)


Group discussion: Which conditional statement causes this sudden change? 
Look for the block:

Key question
Does coral bleaching happen in an instant?


Real coral bleaching doesn’t happen instantly—it’s slow and harmful over time. Let’s modify our code to simulate this.


Activity 3
Import and download the starter project.

Hold the temperature sensor in your hand for 10 seconds.


Take a moment to review the starter code. Look for the following elements:
How the color turns white: Locate the block labeled "change...by 10" and "show color" that controls the color of the LED strip.

What conditional statement makes the change: Locate the block labeled "if...then".

How the color gradually changes: Locate the block labeled "pause(ms)..." that slows down the color change process.
 

Hint: White light means all RGB values are set to 255 (the maximum).


Key question
Watch your coral’s color change. Is it too fast (like a flash) or too slow (takes minutes)?


3.Debug & Test: Test and adjust to an appropriate bleaching speed


Activity 4
1.Group discussion: Which coding block controls how quickly the color shifts?
2.Modify the speed: Try changing the wait time 1s (slower) until you find a suitable speed.
Re-upload and test.

 

4.Decorate & Share: Assemble backdrop and coral bleaching model, and explain program logic


Activity 5
Assemble the background board with your coral model and hardware. Add sea creature stickers or draw your own sea creatures.

Each group gives a 2-minute presentation with two key parts:
- Demonstrate the simulation: Hold the temperature sensor to warm it up, then let it cool to show the coral’s color shift.
- Explain your code logic: "When the temperature goes above 29°C, our code slowly turns the LED white to show bleaching. When it cools, it goes back to healthy orange."

 

5.Extension: Discuss and share why we protect coral reefs and what we can do?


Key Question
Why we protect coral reefs?


Corals aren’t just colorful rocks—they’re living organisms that build massive reefs with superpowers:
- Ocean Homes: 25% of all marine creatures (clownfish, turtles, sharks, and more) rely on reefs for shelter and food.
- Coast Guards: They absorb wave energy from storms, protecting beaches and coastal towns from flooding and erosion.
- Food Providers: Millions of people worldwide depend on reef fish for daily meals.
- Medicine Makers: Scientists use chemicals from reef creatures to develop treatments for cancer, arthritis, and infections.


What can we do:
By simulating coral bleaching, we’ve seen how even small temperature changes can harm our ocean ecosystems. Every action we take to reduce carbon emissions and protect our oceans helps keep corals (and all sea creatures) safe. You’re not just coders—you’re ocean advocates!

icon Lesson5.zip 6.82MB Download(0)
License
All Rights
Reserved
licensBg
0