Adafruit’s Trinket and Gemma are both powered by Atmel’s ATtiny85 microcontroller (MCU). Although the duo only recently hit the streets, the ‘boards have been used to power a wide range of Maker projects across the DIY spectrum. Today, we’re going to be taking a closer look at how to use the devices to determine the IR codes from your remote and trigger specific events.
“Trinket and Gemma are perfect for small projects needing to receive some external event, triggering your own defined output,” explained Adafruit’s Mike Barela. “[Our] project uses the Adafruit IR Sensor to first receive IR commands from a remote, then to use those codes in controlling a project of your own.”
According to Barela, the above-mentioned project simplifies the process of obtaining codes and using them to scale to the limits of the ATTiny85 processor in the Trinket and Gemma boards.
In terms of wiring, check out Adafruit’s diagram shown below.
As you can see, the IR data pin links to the Trinket GPIO #2 (Gemma Pin D2) and is connected to power and ground. To read codes, you will need to connect Trinket GPIO #0 / Gemma D0 to a serial to USB board such as the FTDI Friend receive RX pin (cross connect).
“To demonstrate how the Trinket or Gemma may process IR commands into an action of your choice, a piezo speaker is connected to Trinket Pin GPIO #1 (Gemma Pin D1) to output a tone when a certain IR code is received,” Barela continued. “Going further, you can use an IR code to change NeoPixels, a servo, a solenoid, or any other output.”
Interested in learning more about IR control with the Atmel-powered Trinket and Gemma? Mike Barela’s official tutorial on the Adafruit website is available here, while additional information about Atmel’s versatile ATtiny can be found here.