This month’s The MagPi Magazine includes a six-page tutorial I originally wrote as part of Get Started with MicroPython on Raspberry Pi Pico: The Official Guide, my well-received guide to physical computing on Raspberry Pi’s first-ever microcontroller development board: a two-player reaction-testing game.
As with all projects in the book, the reaction game is designed to build up gradually. The reader is first taken through wiring up a simple circuit with a single LED and a single button, using one to trigger the other. Gradually, the complexity is increased: using the LED to trigger a countdown stopped only when the button is pushed, giving the user a look at how quickly they can react.
The project’s culmination comes with the integration of multiplayer: two buttons are used, and whichever player hits their button first is declared the winner. It’s a simple game, admittedly, but a surprisingly competitive one – and one which introduces a range of core concepts for input handling, timing, and conditional statements.