3pcs Infrared IR Wireless Remote Controller Module Kits DIY Kit HX1838 Geekcreit for Arduino - produ
3pcs Infrared IR Wireless Remote Controller Module Kits DIY Kit HX1838 Geekcreit for Arduino - produ
Features:
?
?
- Transmission Distance: 8m above (specific and surroundings, the receiver sensitivity and other factors)
- Effective angle: 60 degrees
- Sticking Material: 0.125mmPET, the effective life of 20,000 times.
- Quiescent current 3-5uA, dynamic current 3-5mA.
?
Step 1: Assemble Circuit:
?
You will need one for this. I used a UNO, but just about any should work. First wire up the infrared receiver that came with your kit. There are 3 wires, PWR, GND, and SIG, I used port 11 for SIG. Note! some readers have reported that their sensor has different wiring, double check it yourself.
?
Step 2: Download IR Library
In order to reverse engineer the remote and obtain the codes for each button we are going to need to download and install the following library.
Extract the file in your libraries directory. e.g.? ( C:electronics-1.0.5libraries )
note: I had to rename the library because the name was too long, I just renamed it to IR.
Step 3: Add Library to sketch
?
With the IR folder ( or whatever you named it) now in your libraries directory, we can import it into a new sketch.
Start a new sketch and the Click??
????????Sketch->Import Library->IR.
Step 4: Paste Code and compile
Paste the following code into the new sketch. Then verify it compiles.
#include
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
?