Summary of Arduino Remote Control Tutorial
This tutorial shows how to build an Arduino infrared remote by copying IR codes from an existing remote using an IR receiver, then programming the Arduino to resend those codes. Steps: connect hardware, install the Arduino-IRremote library, capture button code and protocol using the IRrecvDemo example (with small modifications), write the remote-control program, and upload it to the Arduino to recreate functions like a standby button from a Sandstrøm radio remote.
Parts used in the Arduino remote control project:
- Arduino
- IR Receiver TSOP31238
- IR Diode
- 100 Ohm Resistor
In this tutorial I am going to show you exactly how to make an Arduino remote control. You can use this project to combine functions from different remote controls and make your super-awesome dream remote control!
If you are not familiar with Arduino, check out What is Arduino and where to start?
A remote control sends out an infrared (IR) code when you push a button. The gadget you point the remote control at will receive this IR code. To make your own Arduino remote control, you need to first copy the IR code from an existing remote control using an IR receiver.
To create our remote control we need to:
- Get button-code from original remote
- Make a remote-control program
- Upload our program to the Arduino
We will use these components for our Arduino project:
You can buy an Arduino at Amazon.
Connect the hardware
We start by connecting the components to the Arduino. Here is how to connect the components:
Get the Arduino-IRremote library
In this tutorial we will use the Arduino-IRremote library. It is open-source and can be found at https://github.com/shirriff/Arduino-IRremote
We’ll download and install the library as described on their website. It’s basically just to download a zip-file, unzip it and rename it. Then put it in the arduino/library/ folder.
This library includes everything we need to receive and send IR signals.
First we need to get the button-code and protocol from the original remote.
In this tutorial we will copy the “Standby”-button from a Sandstrøm radio remote control.
To receive the IR code, we will use the IRrecvDemo example. You’ll find it in the example folder of the Arduino-IRremote folder (…/arduino/libraries/IRremote/examples/IRrecvDemo/IRrecvDemo.ino)
This example prints the code it receives. But we also want to know which protocol it uses. So we’ll modify the program slightly. We’ll add these two lines to the program:
Read more: Arduino Remote Control Tutorial
- What is the first step to make the Arduino remote control?
Get button-code from the original remote using an IR receiver. - How do you connect the components for this project?
Connect the Arduino, IR Receiver TSOP31238, IR diode, and 100 Ohm resistor to the Arduino as described in the tutorial. - Which library is used to receive and send IR signals?
The Arduino-IRremote library is used. - Where can you find the Arduino-IRremote library?
At https://github.com/shirriff/Arduino-IRremote. - How do you install the Arduino-IRremote library?
Download the zip, unzip and rename it, then put it in the arduino/library/ folder as described on the library website. - Which example is used to retrieve button-code and protocol?
The IRrecvDemo example from the Arduino-IRremote examples folder is used. - What modification is suggested for the IRrecvDemo example?
Add two lines to the program so it also prints which protocol the received code uses. - Which remote button is copied in the tutorial example?
The Standby button from a Sandstrøm radio remote control is copied.