The MagPi, Issue 104

The MagPi Issue 104Inside The MagPi Magazine this month you’ll find five pages of step-by-step tutorial walking through the creation of a functional traffic light simulator using the Raspberry Pi Pico microcontroller board – taken from my latest book, Get Started with MicroPython on Raspberry Pi Pico: The Official Guide.

All the projects in the book, the traffic light simulator being no exception, work step-by-step in building the simplest possible incarnation of each then adding increasing complexity – and in doing so introducing new concepts. In the case of the traffic light simulator, it starts off as a simple set of three LEDs which are under timed control.

As the project progresses, the reader adds a button to act as a trigger for a pedestrian crossing – which adds the concept of threading, taking advantage of the second CPU core on the Raspberry Pi Pico’s RP2040 microcontroller – before finishing the project with a buzzer providing audible feedback for when it’s safe to cross.

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