Info

Build an internet radio

Use potentiometers to control an LED and tune in to online radio stations. This tutorial features in Raspberry Pi Press’ book, Simple electronics with GPIO Zero. Updated for the latest Raspberry Pi devices, this book has all the info you need to start creating electronic projects using Raspberry Pi’s GPIO pins.

Coded in Python with the GPIO Zero library, projects include LED lights, a motion-sensing alarm, a rangefinder, a laser-powered tripwire, and a Raspberry Pi robot. In Raspberry Pi Official Magazine #167, we used a trick with a capacitor to get a reading from an analogue sensor. The best — and most reliable — way for Raspberry Pi to detect analogue inputs is by using an analogue-to-digital converter (ADC) chip, such as the MCP3008, which offers eight input channels to connect sensors and other analogue inputs.

This not only eliminates the need for the capacitor, but it allows you to get more precise and instant readings across the entire range of the sensor’s outputs. In this tutorial, we’ll hook up a potentiometer to an MCP3008 to control the brightness of an LED by turning the knob. We’ll then add a second potentiometer and create an internet radio, using the two potentiometers to switch the station and adjust the volume.


Discover more from ChuckysCarnage

Subscribe to get the latest posts sent to your email.

Leave a comment