🔢 MakeCode micro:bit Lab #9 — Digital Counter
English: Use a variable to count button presses.
Indonesia: Gunakan variabel untuk menghitung berapa kali tombol ditekan.
Input → Variable → Counting🔢 Simulator / Simulasi
Tombol A menambah 1. Tombol B mengembalikan hitungan ke 0.
📊 Results / Hasil
💡 Cara Bermain / How to Play
Press RUN to activate the program.
Press A several times and watch the number.
Press B to reset the count to 0.
A variable stores a value that can change while the program runs.
🎯 Tujuan Pembelajaran / Learning Goal
/ Understand variables.
/ Change a variable using button input.
/ Connect programming with counting.
🚀 Coba di micro:bit sungguhan!
Try it with a real micro:bit!
Buat penghitung sederhana menggunakan tombol A dan B di Microsoft MakeCode.
Create a simple counter using buttons A and B in Microsoft MakeCode.
Official MakeCode: makecode.microbit.org
📊 Koneksi dengan Matematika
Math Connection
Counter dapat digunakan untuk menghitung frekuensi, banyak benda, atau jumlah kejadian.
A counter can be used to count frequency, objects, or events.
🧩 Program / Program
English: The variable count stores the number of times Button A is pressed.
Indonesia: Variabel count menyimpan jumlah berapa kali Tombol A ditekan.
Key idea:
🧠 Practice / Latihan
If count = 4 and Button A is pressed once, what is the new value of count?
Jika count = 4 dan Tombol A ditekan satu kali, berapakah nilai count sekarang?
🏆 Challenges / Tantangan
Challenge 1 — Count to 10
Press RUN, then press A exactly 10 times. Check your result.
Indonesia: Tekan RUN, lalu tekan A tepat 10 kali.
Challenge 2 — Think Like a Programmer
Which block changes the value of a variable by adding 1?
Blok mana yang mengubah nilai variabel dengan menambahkan 1?
Challenge 3 — Change the Rule
Imagine Button A should add 2 instead of 1. Which value should replace 1 in change count by 1?
Indonesia: Jika Tombol A harus menambah 2, angka berapa yang menggantikan 1?
📐 Math Connection / Hubungan dengan Matematika
Jika tombol A ditekan 7 kali, maka nilai counter menjadi:
Konsep ini dapat dikembangkan menjadi kegiatan matematika tentang frekuensi, tabel pencatatan, dan pola perubahan nilai.
This idea can be extended to frequency, data tables, and patterns of change.