Lesson 17 IR Remoter Controller

1982

Overview

In this lesson, we will learn how to use an IR receiver to receive the remote controller signal.

Requirement

- 1* Arduino MEGA 2560

- 1* USB Cable

- 1* IR Receiver HX1838

- 1* Remote Controller

- 1* Breadboard

- Several Jumper Wires

Principle

The IR receiver HX1838 can receive the infrared remote controller signals. The IR receiver HX1838 has only three pins (a signal line, VCC and GND). It is easy to connect with the Arduino.

图片1.png

The following is an infrared remote controller:

图片2.png

In this experiment, we program the Arduino to receive the infrared signal, and then send the received data to the serial monitor. In the program, we used the Arduino-IRremote-master library (We provided).

Note:

Before using this library, you have to delete the RobotIRremote directory in your Arduino IDE directory, and delete the RobotIRremote directory in system documents folder. For example, my system is windows 7, I need to delete the RobotIRremote directory in C:\Program Files (x86)\Arduino\libraries and C: \Users\SJG\Documents\Arduino\libraries. Otherwise, when you compile the program, the compiler will complain.

Procedures

1. Build the circuit

图片3.png

2. Program

_17_IRRemoterController.ino

3. Compile the program and upload to Arduino MEGA 2560 board

Now, when you click one of the buttons on the remote controller, you will see the button number of the remote controller is displayed on the serial monitor

 


图片4.png


图片5.png

Summary

By learning this lesson, I believe you have mastered the basic principle of the infrared remote controlling.