🌞 Step 2: Light Sensor Pet

🌟 What's New?

Pets need their sleep! We will use the Light Level sensor and an if block to make our pet sleep when it is dark.

🛠️ What to Do

Use an if / else block from the Logic toolbox.

Rules:

  • If light level is low (less than 50) → pet sleeps 😴 (show sleeping face)
  • Else (if light level is bright) → pet wakes 😊 (show happy face)

Leave a screenshot of your light sensor code here: Insert Light Sensor Code Here

🏆 Challenge!

  • Try It: Cover the Micro:bit with your hand. What happens?
  • Change the number 50 to something else. How dark does it need to be for your pet to sleep?