Back to Portfolio

Project

DIY "Bop It!"

Programmed Micro:bit in embedded C to create a real-time sensor-based game using rotary encoder, flex sensor, button, microphone, and IMU via GPIO and I²C interfaces.

View on GitHubSep 2025 - Dec 2025

Technologies

Embedded CMicro:bitGPIOI²CReal-time SystemsSensor IntegrationRotary EncoderIMUMicrocontroller Programming

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