🌡️ MakeCode micro:bit Lab
🇬🇧 Learn how a micro:bit can read temperature and automatically control an output.
🇮🇩 Memahami bagaimana micro:bit membaca suhu dan secara otomatis mengendalikan sebuah output.
🖥️ Simulator
🧩 Program
English:
If the temperature is above 30°C,
turn the fan ON. Otherwise,
turn the fan OFF.
Indonesia:
Jika suhu lebih dari 30°C,
nyalakan kipas. Jika tidak,
matikan kipas.
The micro:bit does not need someone to press a button. It can read the temperature and make a decision automatically.
Micro:bit tidak perlu menunggu seseorang menekan tombol. Micro:bit dapat membaca suhu dan mengambil keputusan secara otomatis.
🎯 Practice — Latihan
The temperature is 35°C. What should the automatic fan do?
Jika suhu adalah 35°C, apa yang harus dilakukan kipas otomatis?
🏆 Challenges — Tantangan
Challenge 1 — Make the Fan Turn ON
Press RUN and set the temperature above 30°C. Observe the fan.
Tekan RUN dan atur suhu di atas 30°C. Amati kipas.
Challenge 2 — Find the Condition
Which condition makes the fan turn ON?
Kondisi mana yang membuat kipas menyala?
Challenge 3 — Change the Threshold
Suppose the fan should turn ON when the temperature is above 35°C. What threshold should you use?
Jika kipas harus menyala ketika suhu lebih dari 35°C, berapa threshold yang digunakan?
Now Try It with a Real micro:bit!
English
You've practiced with the simulator.
Now create an automatic temperature-controlled
fan using the real Microsoft MakeCode editor.
Indonesia
Kamu sudah berlatih menggunakan simulator.
Sekarang buat kipas otomatis berdasarkan suhu
menggunakan Microsoft MakeCode yang sesungguhnya.
- Open Microsoft MakeCode for micro:bit.
- Create a new project.
- Read the temperature using the micro:bit.
- Use an if...then...else block.
- If the temperature is above 30°C, turn the fan ON.
- If the temperature is 30°C or lower, turn the fan OFF.
Official Microsoft MakeCode for micro:bit
Learn → Simulate → Think → Create