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 Fils de commentaires
1 Réponses de fil
0 Abonnés
 
Commentaire avec le plus de réactions
Le plus populaire des commentaires
3 Auteurs du commentaire
adminBrahim HAMADICHAREFDelphine Auteurs de commentaires récents
  S’abonner  
plus récent plus ancien
Notifier de
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 !