Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <IRremote.h>
- int irPin = 2;
- IRrecv irrecv(irPin);
- decode_results results;
- void setup(){
- Serial.begin(9600);
- irrecv.enableIRIn();
- }
- void loop(){
- if (irrecv.decode(&results)){
- Serial.println(results.value, BIN);
- delay(1);
- irrecv.resume();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment