1 // Remote infrared control
2 // http://www.instructables.com/id/Arduino-Infrared-Remote-tutorial/
4 // Requires library: https://github.com/shirriff/Arduino-IRremote
5 // Numbers 1->6 mapped with a switch construct
7 // Warning: DO NOT coonect the IR sensor to the Arduino without
11 #include <IRremoteInt.h>
14 IRrecv irrecv(RECV_PIN);
15 decode_results results;
20 irrecv.enableIRIn(); // Start the receiver
25 if (irrecv.decode(&results))
27 switch (results.value) {
29 Serial.println("Uno");
32 Serial.println("Due");
35 Serial.println("Tre");
38 Serial.println("Quattro");
41 Serial.println("Cinque");
44 Serial.println("Sei");
47 Serial.println("Repeat");
49 //Serial.println(results.value, HEX); // Debug: show value
50 irrecv.resume(); // Receive the next value