Details
Product Information
Specifications
-
Infrared receiving module USES is 1838 infrared receiving head
-
Size: 6.4 * 7.4 * 7.4 mm,
-
Receiving Angle 90 °
-
Working voltage of 2.7-5.5 V.
-
Frequency of 37.9 KHZ,
-
Receiving distance 18 meters.
Sample code
/ *
* IR receiver simple test:
* When pressing the TV button on the remote control or the other so that the infrared light blinks a few times
* /
const int irReceiver = 10; / / IR Receiver
const int ledPin = 13; / / infrared LEDs
void setup () {
Serial.begin (9600); / / open Serial port, the communication speed is 9600 bps
pinMode (irReceiver, INPUT); / / set the INPUT pin irReceiver
pinMode (ledPin, OUTPUT); / / set the ledPin OUTPUT
}
/ / Let light blinks a few times
void blinkLED () {
for (int i = 1; i <= 4; i + +) {
digitalWrite (ledPin, HIGH); / / turn on lights
delay (100);
digitalWrite (ledPin, LOW); / / Turn off the lights
delay (100);
}
}
void loop () {
int ir_status = digitalRead (irReceiver); / / read status irReceiver
/ / Serial.println (ir_status); / / print the status irReceiver to Serial Port
/ / Check if there irReceiver receive infrared signals
/ / Yes, ir_status will be 0 (because the Receiver will signal the reverse, so 0 representatives receive signals)
if (ir_status == 0)
blinkLED (); / / let the light blinks a few times
}
What's Included
- Infrared receiver module x 1pcs
Applications
Widely used in: stereo, TV, video machine, disc machine, set-top boxes, digital photo frame, car stereo, remote control toys, satellite receivers, hard disk player, air conditioner, heater, electric fan, lighting and other home appliances.
Download