Hack Your Roshamglo Badge

Contributors: Shawn Hymel
Favorited Favorite 1

Hardware Overview

Note: This is a repeat section from the Roshamglo Hookup Guide, but it could be useful if this is the first place you've visited.

Roshamglo labels

The Roshamglo uses the following:

  • ATtiny84
  • IR LED
  • IR receiver with built-in 38kHz demodulator
  • USB programming
  • Programmable red and green LED
  • Power switch
  • 5-way switch for input
  • Reset switch
  • 6 AAA PTH battery clips
  • 3 AAA batteries for power

The brains behind the Roshamglo is an ATtiny84, a lightweight Arduino-compatible microcontroller. The ATtiny84 comes with the following:

  • 8kB of flash memory for our program (~6kB after the bootloader is installed)
  • 512B of SRAM, which stores our variables used in our program
  • 512B of EEPROM
  • 12 I/O pins MAX (the Roshamglo breaks out 9 of these pins)
  • 10-bit analog-to-digital converter, which can be used on 8 pins

For details about what each pin is able to do, refer to the table below.

PinAnalog or DigitalAdditional UsesRoshamglo Uses
0Both Analog Reference5-way switch down
1Both --5-way switch right
2Both --5-way switch up
3Both --IR Receiver
4Both SCK, SCL5-way switch left
6Both MOSI, SDA, PWM5-way switch center
7Both PWMGreen LED
8Digital PWMRed LED
Missing from the list are digital pins 9 and 10. The bootloader uses these two pins for USB programming.

Jumpers and Pins Highlighted

Each of these pins has been broken out to the edge of the board to make customization easy! If you would like to use any of these pins for something other than what it's currently connected to, we provided jumpers that can easily be cut with a hobby knife. The only pins that do not have a jumper on them are the pins used for the five-way switch. The pins for the switch use the ATtiny's internal pull-up resistors, so as long as the switch is not closed, the pin can be configured in any way you'd like without having to cut traces.

One Important Feature Missing

If you hadn't noticed in the pin description, there was no mention of RX or TX pins. This is because, unfortunately, the ATtiny84 doesn't have a hardware UART. The UART is used for serial communication, whether it's for programming or printing messages to the serial window. You might be thinking, "But doesn't the USB connector provide communication between the ATtiny and the computer?" You're right; it does. To keep the bootloader size as small as possible, the bootloader only allows for USB programming. For serial debugging, you'll need a USB cable and a USB-to-Serial adapter, and the SoftwareSerial library to send messages to a computer. You can learn more about serial communication here.