Navigasi Materi

Makecode Micro:bit 1# - Kipas Angin

🌬️ MakeCode micro:bit Lab

Simulator 01 — Controlling a Fan
Mengendalikan kipas dengan tombol micro:bit
Learning Goal / Tujuan Pembelajaran

🇬🇧 Learn how an input can control an output.

🇮🇩 Memahami bagaimana sebuah input dapat mengendalikan output.

Input: Button A / Button B   →   Process: Program   →   Output: Fan

🖥️ Simulator

FAN
micro:bit
🌀
🔴 FAN OFF
Tekan RUN, kemudian tekan tombol A atau B.

🧩 Program

English: Press button A to turn the fan ON and button B to turn the fan OFF.

Indonesia: Tekan tombol A untuk menyalakan kipas dan tombol B untuk mematikannya.

on button A pressed
set FAN to ON
on button B pressed
set FAN to OFF
💡 What is happening?

Button A and Button B are inputs. The fan is the output.

Tombol A dan B adalah input, sedangkan kipas merupakan output.

🎯 Practice — Latihan

Question:
What happens when you press button A?

🏆 Challenges — Tantangan

Challenge 1 — Turn the Fan ON/OFF

Run the program, then turn the fan ON and turn it OFF again.

Jalankan program, kemudian nyalakan dan matikan kembali kipas.

Challenge belum selesai.

Challenge 2 — Change the Control

Suppose button B should turn the fan ON. Which event should contain set FAN to ON?

Jika tombol B harus menyalakan kipas, blok mana yang harus digunakan?

Challenge 3 — Think Like a Programmer

Complete the sequence:

Input → ______ → Output
🔌💻

Now Try It with a Real micro:bit!

English
You've practiced with the simulator. Now create the program using the real Microsoft MakeCode editor.

Indonesia
Kamu sudah berlatih menggunakan simulator. Sekarang buat program menggunakan Microsoft MakeCode yang sesungguhnya.

🌬️ Your Mission
  1. Open Microsoft MakeCode.
  2. Create a new micro:bit project.
  3. Program button A to turn the fan ON.
  4. Program button B to turn the fan OFF.
  5. Test your program in the simulator.
  6. Download the program to your real micro:bit.
🚀 Open Microsoft MakeCode

Official Microsoft MakeCode for micro:bit

Kelas-Matematika Micro:bit Lab
Learn → Try → Create