100% found this document useful (1 vote)
21 views17 pages

Arduino IR Remote Control Training

This document presents a training on the use of sensors and infrared technology with Arduino. It describes the necessary hardware, protocols, and software libraries for receiving and emitting infrared signals.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
21 views17 pages

Arduino IR Remote Control Training

This document presents a training on the use of sensors and infrared technology with Arduino. It describes the necessary hardware, protocols, and software libraries for receiving and emitting infrared signals.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ARDUINO TRAINING (6 SESSION)

TAHRI KHALID

J9

IRRemote control
SUMMARY

Hardware :
IR sensor
TechnologiesIR
Software:
Infrared Library
TP
SENSOR AND TECHNOLOGY IR

j
Applications

. Remotely control projects via infrared


(blind control, lighting...)
. Reissue a remote control identically
to increase the distance
. Replacement of a lost remote control
. Group several remote controls into one
alone (TV + DVD + living room lighting ..?).
IR emitter
The transmitter is a simple infrared LED
which transmits a coded signal (0 and 1), to
an infrared receiver placed in a
other device
IR Receiver
The receiver is an electronic component
which allows for the reception of the infrared signal
of a frequency of 38KHz and a range
of 18 meters.

WS 1838B
IR Receiver IR emitter
IR technology
There are many protocols for
transmissions (NEC, Sony SIRC, Philips RC5,
Philips RC6, raw data...) and several
ways to code information.
Some protocols require repeating three
times the information.
Philips RC5 Protocol

1) Two start bits (S1 and S2), both at logical '1'.


2) UnToggle bit. This bit is reversed every time a key is released and
leaned again.
The 5-bit address for the receiving device
4) The 6-bit command. For the buttons of a remote control.
INFRARED LIBRARY

IRremote
[Link]
Support protocols
#include<IRremoteInt.h>
#include<IRremote.h>

IRrecvirrecv(13);
decode_resultsresults;
void setup()
{
[Link](9600);
[Link]();// Start the receiver
}
voidloop() {
if ([Link]( &results )) {
[Link]([Link], HEX);
[Link]();// Receive the next value
}
delay(100);
}
#include<IRremote.h>

IRsendirsend;

void setup()
{
}
voidloop() {
for (int i = 0; i < 3; i++) {
[Link](0xa90, 12);
delay(40);
}
delay(5000); //5 second delay between each signal burst
}
#include <IRremoteInt.h>
#include <IRremote.h>

boolean led1=LOW, led2=LOW;


IRrecv irrecv(13);
decode_results results;

void setup()
{
[Link](); // Start the receiver
pinMode(5, OUTPUT);
Set pin 6 as OUTPUT;

}
void loop() {
if ([Link]( &results )) {
if([Link] == 0x20DF8877)
{
led1=!led1;
digitalWrite(5,led1);
}

if([Link] == 0x20DF48B7)
{
led2=!led2;
digitalWrite(6,led2);
}
[Link](); // Receive the next value
}
delay(100);
}

You might also like