Difference between revisions of "IR Transmitter and Receiver Kit"

From Geeetech Wiki
Jump to: navigation, search
(Created page with "==Introduction== ===IR Transmitter=== File:IR 1.jpg IR trnsmitter module can emit modulated 38KHz signal via Arduino programming to achieve simulate common remote contro...")
 
(Example code)
Line 31: Line 31:
  
 
==Example code==
 
==Example code==
;Note: Led on the IR transmmiter module should be directed at IR detetor on the receiving board for better result.
 
 
===Transmitter===
 
===Transmitter===
 
  #include <IRremote.h>
 
  #include <IRremote.h>
Line 62: Line 61:
 
   }
 
   }
 
  }
 
  }
 +
 +
;Note: Led on the IR transmmiter module should be directed at IR detetor on the receiving board for better result.
  
 
==How to buy==
 
==How to buy==
 
Click here to buy [http://www.geeetech.com/ir-transmitter-module-p-339.html IR Transmitter Module] and [IR Receiving Module http://www.geeetech.us/arduino-ir-remote-control-0038b-module-diy-kit-p-252.html]
 
Click here to buy [http://www.geeetech.com/ir-transmitter-module-p-339.html IR Transmitter Module] and [IR Receiving Module http://www.geeetech.us/arduino-ir-remote-control-0038b-module-diy-kit-p-252.html]

Revision as of 06:14, 30 May 2012

Introduction

IR Transmitter

IR 1.jpg

IR trnsmitter module can emit modulated 38KHz signal via Arduino programming to achieve simulate common remote control.

IR Receiver

IR 2.jpg

IR Receiver Module is an Arduino compatible 38Khz IR detector which can detect modulated 38Khz around IR signal. Though programming Arduino ,IR receiver can achieve the fuction of decoding the remote control signal.


Specification

  • Power Supply:5V
  • Interface:Digital
  • Modulate Frequency:38Khz

Applications

  • Remote control
  • TV control
  • Air conditioning control

Document

IR Remote library

Wiring diagram

IR 3.jpg

Example code

Transmitter

#include <IRremote.h>
IRsend irsend;
void setup()
{
 Serial.begin(9600);
}
void loop() {
   for (int i = 0; i < 50; i++) {
     irsend.sendSony(0xa90, 12); // Sony TV power code
     delay(40);
   }
 }

Receiver

#include <IRremote.h>
int RECV_PIN = 11; //define input pin on Arduino
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
 Serial.begin(9600);
 irrecv.enableIRIn(); // Start the receiver
}
void loop() {
 if (irrecv.decode(&results)) {
   Serial.println(results.value, HEX);
   irrecv.resume(); // Receive the next value
 }
}
Note
Led on the IR transmmiter module should be directed at IR detetor on the receiving board for better result.

How to buy

Click here to buy IR Transmitter Module and [IR Receiving Module http://www.geeetech.us/arduino-ir-remote-control-0038b-module-diy-kit-p-252.html]