The MagPi, Issue 105

The MagPi Issue 105This 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.

The MagPi Issue 105 is available at all good supermarkets and newsagents, online with global delivery, or as a Creative Commons-licensed DRM-free no-cost PDF download on the official website.

The MagPi, Issue 103

MagPi Issue 103This month’s The MagPi Magazine carries my six-page guide to getting started with physical computing projects using the newly-launched Raspberry Pi Pico, the first microcontroller in the Raspberry Pi family.

Taken from my book, Get Started with MicroPython on Raspberry Pi Pico: The Official Guide, the tutorial walks the reader through programming the Raspberry Pi Pico using MicroPython – starting with the physical computing equivalent of “hello, world,” lighting up an LED. No additional hardware is needed for this part: the Raspberry Pi Pico includes a surface-mount user-addressable LED at the top of the board.

The reader is then shown how solderless breadboards work, introduced to importing MicroPython libraries and handling delays, how external LEDs require resistors, how to read a button input, and finally how to put it al together into a simple circuit which can toggle the LED based on the user’s button presses.

The MagPi Issue 103 is available at all good supermarkets and newsagents, online with global delivery, or as a Creative Commons-licensed DRM-free no-cost PDF download on the official website.