Arduino IR remote
You can control a device with more than a button: a clap, a remote or a joystick. A sound sensor turns air vibrations into voltage, and a remote sends a code on an invisible infrared beam.
Make a clap-on light, give every remote button its own command and combine 'and' and 'or' conditions. Steer a servo smoothly with the joystick.
In this lab
- sound sensor
- infrared remote
- joystick and servo
- clap-on light
What you learn
A device can be controlled not only by a button but also by sound, a remote control or a joystick. The sound sensor turns air vibrations into a voltage, the remote sends a code on an invisible infrared beam, and the joystick is two potentiometers. The aim is to learn different control methods and handle them correctly in a program.
Tasks
- Use the digital (DO) and analog (AO) outputs of the sound sensor
- Keep a state in a variable: toggle with a clap
- Receive remote keys and give each its own command
- Combine conditions with "and" and "or"
- Steer a servo smoothly with a joystick
What you can build
- Clap light — Two claps on, two more off.
- Noise meter — Classroom noise on an LED bar, with a red light when it is too loud.
- Remote-controlled lamp — RGB LED colour and brightness from the remote.
- Robot arm — The joystick X axis turns one servo and Y another.
- Electronic doorbell — Each remote key plays its own tune.
- Reaction game — Who presses the joystick button fastest when the light comes on.