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

All Things Pi Contest.gif

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:

  1. Memory Mode – practice recalling Pi digits in sequence
  2. 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:

  1. tactile interaction
  2. game-based learning
  3. motion sensing
  4. curiosity-driven exploration
  5. portable classroom technology

It can be used in:

  1. classrooms
  2. makerspaces
  3. math clubs
  4. museum learning corners
  5. 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

All Things Pi Contest - image (1).png
  1. BBC micro:bit
  2. USB cable
  3. Battery pack (optional for portable play)
  4. Computer with internet access
  5. Microsoft MakeCode Editor

Create Variables

All Things Pi Contest - image (1).png

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

All Things Pi Contest - image (2).png

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)

All Things Pi Contest - image.png

Button A cycles between modes:

MEM ↔ SHK

Use:

  1. change mode by 1
  2. 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)

All Things Pi Contest - image (2).png

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

All Things Pi Contest

Memory Mode

  1. 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:

  1. memory development
  2. sequence recognition
  3. coding logic
  4. STEM curiosity
  5. interactive mathematics

Future Improvements

Potential upgrades:

  1. score mode
  2. challenge timer
  3. multiplayer mode
  4. sound effects
  5. custom case
  6. longer Pi dataset

Why Micro:bit?

The BBC micro:bit is ideal because it includes:

  1. LED matrix display
  2. accelerometer
  3. buttons
  4. portability
  5. 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

All Things Pi Contest - Microbit

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