794
The KY-005 Infrared Transmitter Module consists of just a 5mm IR LED. It works together with the KY-022 IR receiver module. The Arduino IR Transmitter Module Keyes KY-005, emits infrared light at 38kHz.
Connection
Connect the Power line (middle) and ground (-) to +5 and GND. Connect signal (s) to pin 3 on the Arduino for this example
KY-005 | Arduino |
S | Pin 3 |
middle | +5V |
– | GND |
Code
The following Arduino sketch uses the IRremote library
[codesyntax lang=”cpp”]
#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);
}
}
[/codesyntax]
Links
37 in 1 box Sensor Kit For Arduino Starters brand in stock