WEBVTT

00:00.000 --> 00:04.000
Have you ever wondered how your TV remote sends signals to your TV?

00:04.000 --> 00:10.000
Every button on a remote sends a unique digital code, but how can we know what that code is?

00:10.000 --> 00:20.000
In this activity, we're going to learn how to find the unique code of each button on an IR remote using Arduino and an IR receiver.

00:21.000 --> 00:28.000
The first and most important component of our project is the Arduino Uno. It is the brain of our project.

00:28.000 --> 00:34.000
It receives signals from the IR receiver and displays the unique codes on the serial monitor.

00:39.000 --> 00:43.000
Our next components are the IR remote and IR receiver.

00:43.000 --> 00:48.000
The remote sends commands to change modes, control movement and adjust speed.

00:48.000 --> 00:56.000
While the receiver captures these signals for the robot to follow, and finally, jumper wires to connect everything together.

00:56.000 --> 01:01.000
First, let's understand core components used in our activity.

01:01.000 --> 01:04.000
Arduino Uno is the brain of our project.

01:04.000 --> 01:10.000
The Arduino receives signals from the IR receiver module whenever a button on the remote is pressed.

01:10.000 --> 01:19.000
It then converts these signals into digital data, which is displayed on the serial monitor in the Arduino IDE on your computer.

01:19.000 --> 01:23.000
This allows us to see the unique code of each button in real time.

01:23.000 --> 01:30.000
Technically, the Arduino Uno is a development board based on the AT-MEGA-328P microcontroller.

01:30.000 --> 01:44.000
It includes digital and analog eye-opens, a USB port for programming, a voltage regulator for stable 5 voltage power, a crystal oscillator for timing, and a reset button.

01:44.000 --> 01:51.000
It runs C and C++ code and controls sensors and motors in real time.

01:51.000 --> 01:58.000
An IR receiver module and IR remote work together to enable wireless control of the robot.

01:58.000 --> 02:03.000
The remote uses an IR LED to send coded infrared light.

02:03.000 --> 02:10.000
The receiver, with its photo diode sensor, detects infrared light and converts them into electrical signals.

02:10.000 --> 02:14.000
Each button on the remote has a unique signal pattern.

02:14.000 --> 02:19.000
The Arduino reads these unique signals and carries out the command accordingly.

02:20.000 --> 02:27.000
IR remotes are used to control televisions, allowing users to change channels and adjust volume easily.

02:27.000 --> 02:33.000
They help operate air conditioners and fans to set temperature and modes without moving.

02:33.000 --> 02:38.000
IR remotes are also used in robots and toy cars for wireless control.

02:38.000 --> 02:45.000
They are even used to operate cameras remotely, making photography easier and more convenient.

02:45.000 --> 02:50.000
Now let us understand the circuit connections for our IR remote button code project.

02:50.000 --> 02:53.000
Collect all the required components.

02:53.000 --> 02:58.000
First, connect the IR receiver to the Arduino using jumper wires.

02:58.000 --> 03:04.000
Attach VCC to the 5V pin, GND to a GND pin on the Arduino.

03:04.000 --> 03:09.000
This allows the receiver to function properly and sends signals to the Arduino.

03:09.000 --> 03:14.000
Then, make sure the outpin is connected to Digital Pin 11 on the Arduino.

03:14.000 --> 03:21.000
This pin will receive the signals from the IR remote and send them to the Arduino for processing.

03:21.000 --> 03:26.000
Refer to the circuit diagram to ensure all connections are correct.

03:26.000 --> 03:31.000
Let's program and test the IR remote button code project.

03:31.000 --> 03:37.000
First, connect the Arduino Uno to your laptop using a USB cable. This allows you to upload the code.

03:37.000 --> 03:41.000
Open the Arduino IDE on your computer.

03:41.000 --> 03:46.000
Go to File, open and select your IR remote button config code.

03:46.000 --> 03:49.000
Next, open Tools, then Library Manager.

03:49.000 --> 03:53.000
Search for the IR remote library and install it.

03:53.000 --> 03:59.000
Then, under Tools, select Board and choose Arduino Uno.

03:59.000 --> 04:06.000
After that, go to Tools, Port, and select the correct COM port for your device.

04:06.000 --> 04:11.000
Now, click the Verify button to check the code for any errors.

04:11.000 --> 04:17.000
Once it's verified, click the Upload button to send the code to your Arduino Uno.

04:17.000 --> 04:24.000
After a few seconds, you'll see Done Uploading at the bottom of the screen, confirming a successful upload.

04:24.000 --> 04:29.000
After uploading, open the serial monitor from Tools or the top right button.

04:29.000 --> 04:35.000
Set the BOD rate to 9600 to view the data correctly.

04:35.000 --> 04:43.000
With this, our programming is complete, and our IR remote button code project is now ready to perform.

04:43.000 --> 04:48.000
Now, let us test the IR remote button code project.

04:48.000 --> 04:54.000
Point the IR remote directly at the IR receiver module and press any button on the remote.

04:54.000 --> 04:59.000
Watch the serial monitor in the Arduino IDE on your computer.

04:59.000 --> 05:04.000
You will see a unique hexadecimal code appear for each button you press.

05:04.000 --> 05:09.000
Each button sends a different signal, and the Arduino converts the signal into a readable code.

05:09.000 --> 05:18.000
This allows you to identify which code corresponds to which button, so you can use it later to control LEDs, motors, or other devices in your projects.

05:18.000 --> 05:23.000
Make sure the remote is within range and facing the receiver for accurate detection.

05:23.000 --> 05:33.000
With that, your IR remote is ready, and you can use the recorded codes to control LEDs, motors, or other parts of your Arduino project.

05:33.000 --> 05:38.000
Now, let us test the IR remote button code.

