| 12345678910111213141516171819202122232425262728293031 |
- /*
- Demo code for Project 12 - IRRemote
-
- * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
- * An IR detector/demodulator must be connected to the input RECV_PIN.
-
- updated by Maker Studio
- http://makerstudio.cc
- */
- #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);//print received values
- irrecv.resume(); // Receive the next value
- }
- }
|