What is "charlieplexing"? (a short demo using the Raspberry Pi)

While I was reading Raspberry Pi Cookbook, I came across a few things that looked interesting to demo. One of them was the concept of “charlieplexing“. On past projects, when I needed multiple LEDs (like in my Simon clone), I just connected each individual LED to its own GPIO pin. I was fully aware that current had to travel through the LED in one direction and that it wouldn’t light in the other direction, but it hadn’t occurred to me to take advantage of that fact. This is where charlieplexing comes in – we arrange multiple LEDs such that »

Cooking with Simon Monk - Raspberry Pi Cookbook

It’s been too long since I messed with the Raspberry Pi. It started with Hacktoberfest a few months ago, then we had a baby, and then I got it in my head to write a Chrome extension and… life happened. So I picked up a copy of Raspberry Pi Cookbook by Simon Monk to jump-start things again. I assumed it’d have “recipes” for some cool projects, but it ended up being much more comprehensive. It takes you from the very basics of unpacking your Pi and setting it up, to installing Raspbian and creating your first Python script, »

Connecting an Analog Joystick to the Raspberry Pi (and using it with an RGB LED to simulate a color wheel)

One of the coolest things about the Raspberry Pi is its GPIO pins. They’re just sitting there, waiting to be connected to all kinds of useful peripherals so your Pi can interact with the world around it. Power an LED to signal the user. Place a button in the path of a circuit and detect when a user presses it. Attach sensors to read temperature and humidity, and plug other cards like the Sense HAT over top of the pins. A few months ago, I got a set of 37 sensor modules on Amazon. I knew they wouldn’t »

Creating a Flickering Candle Using an RGB LED on the Raspberry Pi

After getting PWM (pulse-width modulation) to work with an RGB LED last week, I was trying to think of what else I could do with an LED that demonstrated changes in color as well as intensity. I’m not sure why – maybe it was because we lost power in our neighborhood recently – but I thought a flickering candle could be an interesting little challenge… Materials In order to test this out, you’ll need a few things. An RGB LED A button A breadboard A T-cobbler (optional, but makes life easier when wiring up to GPIO pins) A range of »

How to Use an RGB multicolor LED with Pulse Width Modulation (PWM) on the Raspberry Pi

If you buy a kit with random LEDs, wires, switches, etc, like this one I purchased from CanaKit, you’re likely to end up with one or two of those funky little LEDs that appears to be white, and has 4 wires instead of 2. I had set mine aside and made a mental note to figure it out later… well, I’m bored with regular LEDs so that time has come! It’s a special kind of LED that consists of 3 separate LEDs… red, green and blue. By adjusting each color independently, you can create any color (similar »

Creating a "Simon" Game Clone on the Raspberry Pi

Have you been around long enough to remember the popular Simon game from the 70s and 80s? There’ve been plenty of remakes over the years, but I had one of the originals when I was younger. It’s a game of patterns that tests your memory. It flashes a color and sounds a corresponding tone, which you repeat. Then it repeats the same color/tone and adds a new one. The pattern keeps getting longer and longer. Technically, it could go on forever, but I think you “won” after 20 or 30 colors… not that I ever got close! »

Creating Music with Sonic Pi on the Raspberry Pi

Back in May, I was fortunate to attend the Stir Trek conference in Columbus OH (it sold out in under a minute). There were a lot of great presentations, but one that really stood out for me was one on Sonic Pi. Scott Fradkin live-coded Sonic Pi for nearly an hour, not only explaining what it was capable of, but showing us too. He kept building it up as the session went on, and everyone in the theatre had a chance to see and hear what he was creating. By the end of the session, he had a good beat »

How to Create a Raspberry Pi Virtual Machine (VM) in VirtualBox

I recently started flipping through The MagPi back-issues, and came across an article where someone talked about setting up a virtual Raspberry Pi environment. At the time he wrote his article, I don’t think the Pi was even really available to the public yet. It got me thinking though. I’ve been playing around a lot on the Pi itself, but it’d be convenient to have an environment setup where I could experiment with code even when I don’t have access to the Pi. Goal: Setup a virtual machine with Debian (from which Raspbian is derived). Install »