Advertisement
RuiViana

NEW_CR_ID

Jan 10th, 2017
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <IRremote.h>
  2.  
  3. int RECV_PIN = 11;
  4.  
  5. IRrecv irrecv(RECV_PIN);
  6.  
  7. decode_results results;
  8.  
  9. void setup()
  10. {
  11.   Serial.begin(9600);
  12.   irrecv.enableIRIn(); // Start the receiver
  13. }
  14.  
  15. void loop() {
  16.   if (irrecv.decode(&results)) {
  17.     Serial.println(results.value, HEX);
  18.     delay(100); //. Coloquei para dar tempo e não imprimir FFFFFF
  19.     irrecv.resume(); // Receive the next value
  20.   }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement