What you can build with Arduino and why it matters
An Arduino is a small computer board that reads buttons and sensors, then controls lights, motors, and wireless signals. A remote control built on Arduino can turn on a TV, move a robot, or switch lights on and off from across a room — because you write the instructions yourself instead of buying a pre-made remote.
The advantage is flexibility. A store-bought remote does one thing. An Arduino remote can do whatever you program it to do. You might build one to control a fan, trigger a camera, or manage smart home devices. The same basic steps work for all of them.
This guide walks through the actual parts you need, the wiring, and the code you write to make it work. You do not need to be a programmer — Arduino code is designed to be readable, and you can copy working examples and change the numbers to fit your project.
Key Takeaways
- An Arduino remote needs three things: a board (usually Arduino Uno), buttons or a sensor to read input, and an infrared or wireless transmitter to send signals.
- The Arduino reads which button you pressed, then tells the transmitter to send a specific code to the device you want to control.
- You write code in the Arduino IDE (free software you read), upload it to the board through a USB cable, and test by pressing buttons.
- Infrared remotes work line-of-sight and are straightforward to build; wireless remotes (using radio modules) work through walls but require more setup.
- Most projects use existing libraries — pre-written code for common tasks — so you focus on the logic rather than writing everything from scratch.
The parts you actually need
Start with an Arduino Uno board (around $25 new, less used). It has pins where you plug in wires, a USB port to upload code, and enough power to run buttons and transmitters. Do not buy a clone unless you are certain it works — the official Arduino boards are reliable and the price difference is small.
Next, you need buttons. A standard push button costs under $1. You need one button per function — one to turn the device on, one to turn it off, one to change the channel, and so on. Wire each button to a different pin on the Arduino.
For the transmitter, choose infrared (IR) or wireless. An infrared LED and receiver pair cost $5 to $10 together. They work like a TV remote: you press a button, the Arduino lights up the IR LED, and the receiving device sees the signal. The catch is line-of-sight — the LED must point at the receiver, and walls block the signal.
A wireless option uses a radio module like the nRF24L01 (around $3 each, you need two — one on the remote, one on the receiving device). Radio signals pass through walls and work at longer range, but setup is more complex because both the remote and receiver need code.
You also need a breadboard (a board with holes where you plug wires without soldering), jumper wires, and a USB cable to connect the Arduino to your computer. A starter kit with all these parts costs $30 to $50.
How to wire the buttons and transmitter
Wiring is straightforward because Arduino pins are labeled. Each button connects to one pin and to ground. When you press the button, it completes a circuit and the Arduino detects a change in voltage on that pin.
For an infrared remote, the IR LED connects to a pin (usually pin 3) through a resistor (a 220-ohm resistor is standard). The resistor limits current so the LED does not burn out. The LED's longer leg goes to the pin, the shorter leg to ground through the resistor.
For a wireless module, you connect four wires: power (3.3V), ground, and two data pins (usually called MOSI and MISO). The exact pins depend on which module you use, but the documentation shows a diagram. Follow it exactly — swapping power and ground will destroy the module.
Once wired, do not plug in the USB cable yet. Double-check that no wires touch each other and that power and ground are not reversed. Then connect the USB cable to your computer.
Writing and uploading the code
read the Arduino IDE from arduino.cc (free, works on Windows, Mac, and Linux). Open it and you see a blank sketch — that is what Arduino calls a program. The IDE has two main functions: setup() runs once when the board powers on, and loop() runs over and over.
In setup(), you tell the Arduino which pins are inputs (buttons) and which are outputs (the transmitter). In loop(), you check if a button is pressed, and if it is, you send a signal.
For infrared, use the IRremote library. Go to Sketch > Include Library > Manage Libraries, search for "IRremote", and install it. Then your code can use commands like irsend.send() to transmit a code. You need to know the code your target device expects — for a TV, you can find these codes online or record them from an existing remote using an IR receiver.
Here is a minimal example for a button that sends an infrared code:
int buttonPin = 2; int ledPin = 3; void setup() { pinMode(buttonPin, INPUT); IrSender.begin(ledPin); } void loop() { if (digitalRead(buttonPin) == HIGH) { IrSender.sendNEC(0x20DF10EF, 32); delay(500); } }
This code reads pin 2 (the button). When it is pressed, it sends the code 0x20DF10EF (a real TV power code) through the IR LED on pin 3. The delay(500) prevents the code from sending 100 times per second — it waits 500 milliseconds between sends.
To upload, plug the USB cable in, go to Tools > Board and select "Arduino Uno", then Tools > Port and select the port your Arduino is on (usually COM3 or /dev/ttyUSB0). Click the Upload button (arrow icon). The IDE compiles your code and sends it to the board. You see "Done uploading" when it finishes.
Testing and troubleshooting
Press a button and watch the target device. If it responds, you are done. If not, check these things in order.
First, make sure the IR LED is actually lighting up. Point your phone camera at it and press the button — cameras see infrared light even though your eyes do not. If the LED does not light, check that the resistor is in place and the wiring matches the diagram.
Second, verify the code is correct for your device. TV codes are not universal — a Samsung power code will not work on an LG. Search online for "[your device] infrared codes" and replace the code in your sketch. If you cannot find the code, use an IR receiver module (around $5) to record the code from an existing remote, then copy that code into your sketch.
Third, check the distance and angle. Infrared works best within 10 feet and with a clear line of sight. Move closer and point the LED directly at the receiver.
If you are using a wireless module and the remote does not work, the receiving device probably does not have the matching code. Both the remote and receiver need code that talks to each other — they are not pre-programmed to work together. You have to write code for both sides.
Infrared vs. wireless: which to choose
Infrared is simpler to build and requires only one Arduino (the remote). You do not need to program a receiver — you are just sending signals to an existing device like a TV or stereo. The downside is line-of-sight and short range.
Wireless is more complex because you need two Arduinos and code on both sides, but it works through walls and at longer range (up to 100 feet with the right module). Choose wireless if you want to control something in another room or if the receiver is not in direct sight of the remote.
For a first project, start with infrared and an existing device like a TV. Once that works, you understand the pattern and can move to wireless if you need it.
Common mistakes and how to avoid them
The most common mistake is wrong pin numbers. You write code for pin 2, but wire the button to pin 3. The code runs fine, but the button does nothing. Always write down which pin each component uses before you start wiring, then check your sketch against that list.
The second mistake is forgetting the resistor on the IR LED. The LED will light up without it, but it burns out quickly. Always use a resistor rated for the current your Arduino pin can supply — 220 ohms is safe for most setups.
The third mistake is using the wrong infrared code. You copy a code from the internet, upload it, and nothing happens. The code is valid, but it is for a different device. Always test with a device you know works, or record the code from an existing remote.
The fourth mistake is uploading code while the USB cable is unplugged. The IDE will say it uploaded successfully, but nothing happens on the board. Always check that the USB cable is plugged in and the port is selected correctly before you click Upload.
Frequently Asked Questions
Can I control multiple devices with one remote?
Yes. Add more buttons, one per device or function. In the loop() function, check each button and send a different code. You can control a TV, stereo, and lights all from the same Arduino remote.
How do I find the infrared codes for my device?
Search online for "[brand] [model] infrared codes" — most manufacturers publish them. If you cannot find them, buy an IR receiver module (around $5), connect it to the Arduino, and use a sketch that records codes from an existing remote. Then copy those codes into your transmitter sketch.
Can I power the Arduino from a battery instead of USB?
Yes. Connect a 9V battery to the power jack on the Arduino, or solder wires directly to the power pins. The Arduino will run as long as the battery has charge. Use a rechargeable battery to save money.
What if my wireless module does not work?
Check that both the remote and receiver are using the same library and the same radio channel number in the code. The nRF24L01 module requires matching code on both sides — they will not talk to each other otherwise. Also verify the wiring matches the module's datasheet exactly.
Can I use Arduino to control smart home devices?
Yes, if the device accepts infrared or wireless signals. Many smart bulbs, plugs, and thermostats respond to IR codes or radio protocols. Check your device's documentation to see what signals it accepts, then build a remote that sends those signals.