Mercurial > code > home > repos > homeauto
view service/busyboxArduino/IRremote/examples/IRrecvDemo/IRrecvDemo.ino @ 960:a5c7e285fef5
add IRremote
Ignore-this: c295c68f923af8d072841f1d7c1e5ab8
darcs-hash:20150120015526-312f9-ed34137ad90e3436dcaa2ec10358705a4f87a80b
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 19 Jan 2015 17:55:26 -0800 |
parents | |
children |
line wrap: on
line source
/* * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv * An IR detector/demodulator must be connected to the input RECV_PIN. * Version 0.1 July, 2009 * Copyright 2009 Ken Shirriff * http://arcfn.com */ #include <IRremote.h> 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(100); }