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

  1. Use the digital (DO) and analog (AO) outputs of the sound sensor
  2. Keep a state in a variable: toggle with a clap
  3. Receive remote keys and give each its own command
  4. Combine conditions with "and" and "or"
  5. 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.

Virtual Lab › Robotics

Related labs

  • Robotics basics
  • Arduino
  • Arduino LED
  • Arduino sensors
  • Arduino servo
  • Arduino thermometer