Created
July 4, 2017 21:17
-
-
Save anonymous/636179227838d787099e17e22d240ae1 to your computer and use it in GitHub Desktop.
ir-remoto-arduino.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <IRremote.h> | |
int RECV_PIN = 11; //declaramos el pin que recibira la señal | |
IRrecv irrecv(RECV_PIN); | |
decode_results results; | |
void setup() { | |
Serial.begin(9600); //inicializamos el puerto serial a 9600 | |
irrecv.enableIRIn(); // Comienza a recibir los datos | |
} | |
void loop() { | |
if (irrecv.decode(&results)) { | |
Serial.println(results.value, HEX); // imprime el valor en codigo hexadecimal | |
irrecv.resume(); // Se preparar para recibir el siguiente valor | |
delay(10); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment