Roshamglo Project: TV-B-Gone
In addition to playing some infrared (IR) Rock-Paper-Scissors, you can use your Roshamglo badge for a number of fun activities, including sending IR commands to your TV (well, almost any TV, really).
SparkFun Roshamglo Badge KitKIT-14130
A few years ago, Mitch Altman designed an ATtiny85-based IR remote, known as TV-B-Gone®, that transmits the power code of popular televisions over the course of about a minute. Since then, several people have contributed to the open source code of TV-B-Gone, including Limor Fried and Ken Shirriff, who created an Arduino port of the program.
You will need a Roshamglo badge and, optionally, a resistor between 47Ω and 1kΩ. We recommend the Resistor Kit, as it has several different resistor options to play with.
If you plan to add a resistor to your Roshamglo badge to increase the IR range, you will need a soldering iron and solder.
If you aren't familiar with the following concepts, we recommend checking out these tutorials before continuing.
How to Solder: Through-Hole Soldering
Hack Your Roshamglo Badge
Roshamglo Hookup Guide
Hardware Assembly (Optional)
In its default state, the Roshamglo badge has an IR transmission range of about 5 feet. This was done by design to prevent people from bouncing signals off other people and interrupting Rock-Paper-Scissors games.
However, 5 feet is a little short for being able to control a TV from across the room. You don't need to upgrade the hardware, but if you do, you can easily shoot TV beams from 40+ feet away.
First, choose a resistor value you want to use to upgrade your badge's range. Something between 47Ω (40+ feet range) and 1kΩ (around 10 feet) will work the best. Note that the resistor will be in parallel with the 1.5kΩ resistor that's already on the board. To help you decide what to choose, here are some common resistor values that should work:
|Resistor||Current Through LED||Predicted Range|
In the corner of the Roshamglo board, by the USB connector, you will see two holes situated diagonally toward the center of the board with the label
Solder your chosen resistor into those holes. We recommend bending the resistor's leads so that the resistor folds nicely onto the board and does not touch other components.
Before we load the TV-B-Gone code onto the Roshamglo badge, we'll need to install Arduino and the Roshamglo board definitions. Follow the instructions in the tutorial below to make sure you can send new programs to your Roshamglo board.
Hack Your Roshamglo Badge
March 12, 2017
Download the Roshamglo Project Repository as a .zip file:
Unzip it. Open the Arduino IDE and select File > Open. Navigate to \
By default, the Roshamglo-TV-B-Gone code supports North American IR codes. To change them to support European Union codes, click on the main.h tab and change
language:c #define REGION NA
language:c #define REGION EU
Select Tools > Board > Roshamglo.
Click the Upload button.
Wait for Uploading to appear at the bottom of the Arduino window.
At this point, make sure your Roshamglo badge is OFF, and press and hold the Down button on the Roshamglo badge (hold the five-way switch toward the SparkFun logo). While holding the Down button, insert the badge into an available USB slot on your computer.
The program should be uploaded from Arduino. You should see a Done Uploading message appear.
- Try a different USB port
- Unplug other USB devices
- Close other programs that might be running
- Reinstall the Roshamglo USB driver
- Try a different computer
Try It Out
Turn on your Roshamglo badge. If North American IR codes were chosen (default), the green LED will blink three times. If EU codes were chosen, the green LED will blink six times.
Find a nearby TV, aim the USB connector toward it and press down on the center button of the five-way switch. The green LED should begin to flash intermittently, which indicates that the IR codes are being sent. You can let go of the button at this point; the codes will continue to be sent. Note that it could take up to 72 seconds for all the codes to be transmitted; keep pointing the badge at your target.
With any luck, the TV should turn off (or perhaps on, as the IR codes for on and off are the same for many TVs).
If you would like to cancel the 72 seconds of code transmission, you can either press the RESET button or turn the badge off using the side switch.
Resources and Going Further
This is just one example of something fun you can do with Roshamglo. For more information, check out the resources below:
Need some inspiration for your next project? Check out some of these related tutorials: