Août 302013
 

A quick article around my adventures with the Arduino.

This time, lets play with infrared.

More precisely lets catch IR signals and send them back.

The IR sensor can be found here.
The IR emitter can be found here.

You can use 2 arduino or built it all on one arduino (if so, add a object.enableIRIn() after each send or you wont be able to receive after the 1st send).

Here below the wiring and a quick and dirty sketch for sending.

Now go and place with your remotes !

ir_receiver_sender_bb

 

Sketch to send signals with your IR emitter.

/*
* IR LED must be connected to Arduino PWM pin 3.
*/

#include <remote.h>

IRsend irsend;

void setup()
{
Serial.begin(9600);
}

void send(int code)
{
for (int i = 0; i < 3; i++) {
irsend.sendNEC(code, 32); // code, length
delay(40);
}
}

void loop() {
send(0x11223344);
delay(5000);
}

3
Poster un Commentaire

avatar
2 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
3 Comment authors
adminBrahim HAMADICHAREFDelphine Recent comment authors
  Subscribe  
plus récents plus anciens
Me notifier des
Delphine
Invité

On va peut-être enfin avoir notre télécommande universelle 😉 bisoux.

Brahim HAMADICHAREF
Invité

Please provide a link to the library used

Fix the link « The IR emitter can be found here » should be
http://dx.com/p/38khz-ir-infrared-transmitter-module-for-arduino-135040

Great website !