Hardware:
Read moreFor the particular receiver I use, when facing towards you the pins go to:
- Pin 11
- GND
- 5V
However, you might want to check for your receiver because some vary.
Software:First you must copy & paste this in your browser:
https://github.com/z3t0/Arduino-IRremote.git
And follow these instructions:
http://skaarhoj.com/wiki/index.php/Steps_to_install_an_Arduino_Library_from_GitHub
Then you can upload this code to your Arduino, open the serial monitor, and press away (to find out which buttons do what)!
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 May, 2016
* Copyright 2016 Grant Wodny
*/
#include
int RECV_PIN = 11;
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
}
delay(175);
}
Comments