Pi Master Challenge – Interactive Micro:bit STEM Game for Learning Pi
by dhamodaran kkp in Circuits > Electronics
182 Views, 1 Favorites, 0 Comments
Pi Master Challenge – Interactive Micro:bit STEM Game for Learning Pi
Introduction
Pi is one of the most recognized numbers in mathematics, yet for many learners it remains abstract, difficult to memorize, and disconnected from real-world engagement.
I wanted to transform Pi from a passive concept into an active hands-on experience.
Pi Master Challenge is a compact interactive learning game built with a BBC micro:bit and MakeCode. It turns mathematics into something physical, playful, and memorable through two engaging modes:
- Memory Mode – practice recalling Pi digits in sequence
- Shake Mode – reveal Pi digits one by one using motion input
This project demonstrates how low-cost microcontrollers can convert traditional memorization into interactive STEM learning.
Why This Project Matters
Many students encounter Pi only through textbooks or worksheets. This build reimagines the experience through:
- tactile interaction
- game-based learning
- motion sensing
- curiosity-driven exploration
- portable classroom technology
It can be used in:
- classrooms
- makerspaces
- math clubs
- museum learning corners
- home education environments
Features
Memory Mode
Displays Pi digits for recall practice and mental retention.
Shake Mode
Users shake the micro:bit to reveal the next digit of Pi, creating a fun surprise-based interaction.
Compact and Affordable
Built using a single micro:bit with no complex external hardware.
Beginner Friendly
Designed in Microsoft MakeCode block programming, making it accessible for new coders.
Supplies
- BBC micro:bit
- USB cable
- Battery pack (optional for portable play)
- Computer with internet access
- Microsoft MakeCode Editor
Create Variables
Create these variables in MakeCode:
Before programming the logic, create these variables in MakeCode.
Open:
Variables → Make a Variable
mode
index
piDigits
What Each Variable Does
mode
Stores current game mode:
0 = Memory
1 = Shake
index
Tracks which Pi digit should display next.
piDigits
Stores the Pi digit list in an array.
Setup on Start
Inside
on start
Add:
set mode to 0
set index to 0
Then create the Pi digit array:
set piDigits to [3,1,4,1,5,9,2,6,5,3,5,8,9,7,9]
Finally show:
show string "PI MASTER"
show string "MEM"
This sets the startup mode.
Program Button a (Mode Switch)
Button A cycles between modes:
MEM ↔ SHK
Use:
- change mode by 1
- if mode > 1 then set mode to 0
Then display:
if mode = 0 show MEM
if mode = 1 show SHK
Program Button B (Launch Mode)
Button B starts the selected mode.
If mode = 0
show string "MEMORY"
show string "3.14159265358979"
If mode = 1
show string "SHAKE"
How to Play
Memory Mode
- Press A until:
MEM
Press B.
The device shows Pi digits for memorization.
Shake Mode
Press A until:
SHK
Press B.
Shake the device to reveal:
3 → 1 → 4 → 1 → 5 ...
Learning Outcomes
This project supports:
- memory development
- sequence recognition
- coding logic
- STEM curiosity
- interactive mathematics
Future Improvements
Potential upgrades:
- score mode
- challenge timer
- multiplayer mode
- sound effects
- custom case
- longer Pi dataset
Why Micro:bit?
The BBC micro:bit is ideal because it includes:
- LED matrix display
- accelerometer
- buttons
- portability
- beginner coding tools
It enables rapid educational prototyping with minimal hardware.
Final Thoughts
Pi Master Challenge proves that mathematics can be interactive, portable, and enjoyable.
With one microcontroller, a famous constant becomes a hands-on learning game.
Explore and Remix
Explore and Remix
This project was built in Microsoft MakeCode. Open the live project below to test, study, or customize your own Pi learning game:
https://makecode.microbit.org/S35012-79536-47475-70009