# SmartMatrix Remote Controlled LED Art Display

## Overview

This guide will show you how to add an IR receiver to a Teensy 3.1 to play patterns on a 32x32 Pixel RGB LED Matrix Panel. The Teensy 3.1 runs an Arduino sketch that draws to the display, listens for IR remote commands, and refreshes the display at a high frame rate with good color depth. The SmartMatrix Shield makes it easy to connect everything together.  
 \* This guide can be used in combination with the SmartMatrix Animated GIF Player guide. Adding a microSD card adds support for playing animated GIF files in addition to patterns in the Arduino Sketch.

We will explain the basic soldering and wiring to connect the IR receiver to the SmartMatrix Shield, and how to load the Arduino sketch that controls everything onto the Teensy 3.1.

https://www.youtube.com/watch?v=dRn1rFWGPWk

The demo video shows the display mounted in a shadow box display with frosted acrylic diffuser (1/4" gap between LEDs and diffuser on the right, 1/2" gap on the left). &nbsp;The LEDs look better when diffused, whether its through a piece of copy paper or through specialty lighting acrylic. &nbsp;The frame is a subject for a future tutorial.

## Major&nbsp;Components

### 32x32 RGB LED Matrix Panel

A 32x32 RGB LED Matrix Panel is an affordable way to add over a thousand bright pixels to your project. &nbsp;Compared to a Neopixel matrix, these panels use smaller LEDs which are bright but not as blinding, and have a higher pixel density. &nbsp;Unlike a Neopixel matrix, the panel requires a microcontroller to refresh the LEDs continuously to display an image. &nbsp;It takes about 40% of the CPU time and most of the memory of an Arduino Uno just to refresh a panel, and that's with a low refresh rate and a limited 12-bit color palette. &nbsp;To get a better image quality, we will use a more powerful microcontroller.

### Teensy 3.1

Despite its small size, the Teensy 3.1 packs a lot of horsepower as it uses an ARM Cortex M4 CPU that runs at 72MHz and has 64kB of RAM. &nbsp;This is more than enough power and memory to refresh the display with a high refresh rate and full color palette. &nbsp;Even better, the processor in the Teensy 3.1 comes with a DMA engine that can move data from memory to pins to allow refreshing the display in the background, so the main program can run without as many interruptions. &nbsp;The Teensy 3.1 is programmable using a modified Arduino IDE, and uses many of the same libraries as normal Arduino boards, so it should be familiar to program for anyone that has written an Arduino sketch before.

### SmartMatrix Shield and Library

The SmartMatrix Shield is the best way to connect the Teensy 3.1 to the RGB LED Matrix Panel. &nbsp;The shield takes care of routing the 13 signals needed to refresh the display, adds convenient connectors for power, and brings the unused signals out to a convenient expansion header. &nbsp;The SmartMatrix Library includes code that refreshes the display in the background, and provides functions that make it easy to draw to the display and scroll text on top of the drawing.

### Aurora Arduino Sketch

[Aurora](https://github.com/pixelmatix/aurora)&nbsp;is an Arduino Sketch designed to give a lot of options for displaying customizable content on a 32x32 RGB Matrix Panel, with an easy to use interface controllable through an IR remote control. &nbsp;Using the remote you can choose a pattern or animation to display, change the brightness to match ambient light, sleep the display when you are not using it, and enable autoplay to rotate through content automatically.

### IR Sensor, Remote, Arduino Library

To remotely control the Arduino sketch we will add an IR Sensor to the SmartMatrix Shield, and use a compatible remote control. &nbsp;The [Arduino-IRremote](https://github.com/shirriff/Arduino-IRremote)&nbsp;library decodes the signal coming from the IR sensor.

### FastLED Library

From the [project's homepage](http://fastled.io/): "FastLED is a fast, efficient, easy-to-use Arduino library for programming addressable LED strips and pixels such as WS2810, WS2811, LPD8806, Neopixel and more. FastLED is used by thousands of developers, in countless art and hobby projects, and in numerous commercial products."

We use FastLED's helper functions to efficiently generate patterns and work with color palettes. &nbsp;FastLED has a great community, and many of the patterns in our Arduino sketch have been contributed by the [FastLED community](https://plus.google.com/communities/109127054924227823508).

## Parts List for Guide

- [32x32 RGB LED Matrix Panel - 6mm pitch](https://www.adafruit.com/product/1484)
- [Teensy 3.1](https://www.adafruit.com/product/1625)
- [SmartMatrix Shield for Teensy 3.1](https://www.adafruit.com/product/1902)
- [5V 4A Switching Power Supply](https://www.adafruit.com/product/1466)
- [15-pin right-angle male header](https://www.adafruit.com/product/1540)
- [IR Remote (battery included)](https://www.adafruit.com/products/389)
- [IR&nbsp;Sensor](https://www.adafruit.com/products/157)
- 3-conductor Female/Female Jumper Wires: [3"](https://www.adafruit.com/product/794)&nbsp;/ [6"](https://www.adafruit.com/products/266)&nbsp;/&nbsp;[12"](https://www.adafruit.com/products/793)

  - Select long enough wires to mount the IR Receiver where you want it. 3" is just long enough to reach the closest edge of the panel.

- Needle Nose&nbsp;Pliers
- Optional for Animated GIFs

  - [MicroSD Memory Card and SD to MicroSD Adapter](https://www.adafruit.com/product/1294)
  - [6-conductor 3" Female/Female Jumper Wires](https://www.adafruit.com/product/794)
  - MicroSD Reader to load files onto card

- For [SmartMatrix Shield Assembly](http://docs.pixelmatix.com/SmartMatrix/shieldref.html#kit-assembly):

  - Soldering Iron
  - Solder
  - Diagonal Cutters
  - Wire Strippers
  - Small Flathead Screwdriver
  - X-Acto or similar Knife
  - Recommended: Multimeter

- [Next Page](https://learn.adafruit.com/smartmatrix-remote-controlled-led-art-display/assembly.md)

## Featured Products

### 32x32 RGB LED Matrix Panel - 6mm pitch

[32x32 RGB LED Matrix Panel - 6mm pitch](https://www.adafruit.com/product/1484)
Bring a little bit of Times Square into your home with this sweet 32 x 32 square RGB LED matrix panel. These panels are normally used to make video walls, here in New York we see them on the sides of busses and bus stops, to display animations or short video clips. We thought they looked...

In Stock
[Buy Now](https://www.adafruit.com/product/1484)
[Related Guides to the Product](https://learn.adafruit.com/products/1484/guides)
### Teensy 3.1 + header

[Teensy 3.1 + header](https://www.adafruit.com/product/1625)
[Teensy](http://www.pjrc.com/teensy/index.html) 3.1 is a small, breadboard-friendly development board designed by Paul Stoffregen and PJRC. Teensy 3.1 brings a low-cost 32 bit ARM Cortex-M4 platform to hobbyists, students and engineers, using an adapted version of the Arduino IDE...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1625)
[Related Guides to the Product](https://learn.adafruit.com/products/1625/guides)
### SmartMatrix SmartLED Shield (V4) for Teensy 3

[SmartMatrix SmartLED Shield (V4) for Teensy 3](https://www.adafruit.com/product/1902)
So you have a [Teensy](https://www.adafruit.com/product/2756) and a [RGB LED Matrix Panel](https://www.adafruit.com/product/1902?q=RGB%20LED%20Matrix%20Panel&)&nbsp;and you want an easy way to add graphics to your matrix without having to toss aside your Teensy or do...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1902)
[Related Guides to the Product](https://learn.adafruit.com/products/1902/guides)
### IR (Infrared) Receiver Sensor

[IR (Infrared) Receiver Sensor](https://www.adafruit.com/product/157)
IR sensor tuned to 38KHz, perfect for receiving commands from a TV remote control. Runs at 3V to 5V so it's great for any microcontroller.  
  
To use, connect pin 3 (all the way to the right) to 5V power, pin 2 (middle) to ground and listen on pin 1. It doesn't do any decoding...

In Stock
[Buy Now](https://www.adafruit.com/product/157)
[Related Guides to the Product](https://learn.adafruit.com/products/157/guides)
### Mini Remote Control

[Mini Remote Control](https://www.adafruit.com/product/389)
This little remote control would be handy for controlling a robot or other project from across the room. It has 21 buttons and a layout we thought was handy: directional buttons and number entry buttons. The remote uses the NEC encoding type and sends data codes 0 thru 26 (it skips #3, #7,...

In Stock
[Buy Now](https://www.adafruit.com/product/389)
[Related Guides to the Product](https://learn.adafruit.com/products/389/guides)
### Premium Female/Female Jumper Wires - 40 x 3" (75mm)

[Premium Female/Female Jumper Wires - 40 x 3" (75mm)](https://www.adafruit.com/product/794)
Handy for making wire harnesses or jumpering between headers on PCB's. These premium jumper wires are 3" (75mm) long and come in a 'strip' of 40 (4 pieces of each of ten rainbow colors). They have 0.1" female header contacts on either end and fit cleanly next to each...

In Stock
[Buy Now](https://www.adafruit.com/product/794)
[Related Guides to the Product](https://learn.adafruit.com/products/794/guides)
### 5V 4A (4000mA) switching power supply - UL Listed

[5V 4A (4000mA) switching power supply - UL Listed](https://www.adafruit.com/product/1466)
Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to **4 Amps** (4000mA). 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one up at any hardware store for $1 or so,...

In Stock
[Buy Now](https://www.adafruit.com/product/1466)
[Related Guides to the Product](https://learn.adafruit.com/products/1466/guides)
### Break-away 0.1" 36-pin strip right-angle male header (10 pack)

[Break-away 0.1" 36-pin strip right-angle male header (10 pack)](https://www.adafruit.com/product/1540)
Breakaway header is like the duct tape of electronics. Its great for connecting things together, soldering to perf-boards, fits into any breadboard, etc. We go through these guys real fast, and thought that given how handy they are, we'd offer them in a pack of ten!  
  
Each pack...

In Stock
[Buy Now](https://www.adafruit.com/product/1540)
[Related Guides to the Product](https://learn.adafruit.com/products/1540/guides)

## Related Guides

- [Animated Flame Pendant](https://learn.adafruit.com/animated-flame-pendant.md)
- [Connecting a 16x32 RGB LED Matrix Panel to a Raspberry Pi](https://learn.adafruit.com/connecting-a-16x32-rgb-led-matrix-panel-to-a-raspberry-pi.md)
- [DIY Pocket LED Gamer - Tiny Tetris!](https://learn.adafruit.com/diy-3d-printed-handheld-pocket-game-tiny-tetris-snake.md)
- [Adafruit RGB Matrix + Real Time Clock HAT for Raspberry Pi](https://learn.adafruit.com/adafruit-rgb-matrix-plus-real-time-clock-hat-for-raspberry-pi.md)
- [Custom Controllers for MakeCode Arcade](https://learn.adafruit.com/custom-controllers-for-makecode-arcade.md)
- [RGB LED Matrices with CircuitPython](https://learn.adafruit.com/rgb-led-matrices-matrix-panels-with-circuitpython.md)
- [NeoPixel Novelty Cufflinks with Scrolling Text](https://learn.adafruit.com/neopixel-novelty-cufflinks-with-scrolling-text.md)
- [Infinite Text Adventure](https://learn.adafruit.com/infinite-text-adventure.md)
- [Adafruit Protomatter RGB Matrix Library](https://learn.adafruit.com/adafruit-protomatter-rgb-matrix-library.md)
- [Multi-tasking the Arduino - Part 1](https://learn.adafruit.com/multi-tasking-the-arduino-part-1.md)
- [LED Glasses Custom Animated Graphics with Sprites](https://learn.adafruit.com/led-glasses-custom-animated-graphics-with-sprites.md)
- [16x32 RGB Display with Raspberry Pi - part 2](https://learn.adafruit.com/16x32-rgb-display-with-raspberry-pi-part-2.md)
- [Purple Air AQI Display](https://learn.adafruit.com/purple-air-aqi-display.md)
- [Motion Controlled Matrix Bed Clock](https://learn.adafruit.com/motion-controlled-matrix-bed-clock.md)
- [Adafruit PiCowbell Proto for Pico](https://learn.adafruit.com/picowbell-proto.md)
