All tutorials

Ready, Set, React! Build a PicoBricks Reaction Game

picobricksBeginner ⏱ 30 mins

Overview

In this project we are going to design a game to test your reaction times against your friends.

When PicoBricks is turned on, a timer will start. The timer can detect time in , which are tiny slices of time. Timers are used in lots of household items like ovens, air fryers and microwaves.

We will use the to show a welcome message when PicoBricks starts and instructions on how to begin the game. The timer will count down from three. Once it hits zero, the will turn on randomly anywhere from 1 to 5 seconds later.

When the LED turns on, the player has to press the as fast as they can. This is the player’s reaction time, and it will be measured in milliseconds. The player’s reaction time will then be displayed on the OLED screen.

🎯

What you'll learn

  • How to make a countdown timer
  • How to use random numbers to surprise the player
  • How to measure time in milliseconds
  • How to make a button, an LED and a screen work together