Back to Portfolio

DIY "Bop It!"

Sep 2025 - Dec 2025
Embedded CMicro:bitGPIOI²CReal-time SystemsSensor IntegrationRotary EncoderIMUMicrocontroller Programming
View on GitHub

Overview

A real-time sensor-based game implementation on the Micro:bit microcontroller, recreating the classic "Bop It!" game mechanics. The project involved programming the Micro:bit in embedded C to run a game loop that responds to various sensor inputs in real-time.

The game uses multiple sensors connected via GPIO and I²C: a rotary encoder for twisting actions, a flex sensor for bending, a button for pressing, a microphone for sound detection, and an IMU (Inertial Measurement Unit) for motion detection. The game loop must process these inputs with low latency while managing tight memory and timing constraints.

The implementation required synchronized audio playback alongside latency-critical input validation, ensuring the game responds accurately to user actions within the required time windows. This project demonstrated skills in embedded systems programming, real-time systems design, and hardware-software integration.

Project Context

This project was completed as part of CE346 Embedded Systems course at Northwestern University. The goal was to create an interactive game that demonstrates real-time sensor processing and hardware integration.

Key Features

  • Real-time game loop with multiple sensor inputs
  • Integration of 5+ different sensor types (rotary encoder, flex sensor, button, microphone, IMU)
  • Synchronized audio playback with game actions
  • Low-latency input validation under memory and timing constraints
  • GPIO and I²C communication protocols

Challenges

  • Managing real-time constraints with multiple concurrent sensor inputs
  • Optimizing memory usage on resource-constrained Micro:bit
  • Synchronizing audio playback with game state
  • Ensuring low-latency response to user actions
  • Debugging hardware-software integration issues

Results

  • Successfully implemented real-time game loop with all sensors functional
  • Achieved low-latency response times meeting game requirements
  • Demonstrated proficiency in embedded C and microcontroller programming