Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <boarddefs.h>
  2. #include <IRremote.h>
  3. #include <IRremoteInt.h>
  4. #include <ir_Lego_PF_BitStreamEncoder.h>
  5.  
  6. int RECV_PIN = 2;
  7. IRrecv irrecv(RECV_PIN);
  8. decode_results results;
  9.  
  10. void setup()
  11. {
  12. Serial.begin(9600);
  13. irrecv.enableIRIn(); // Start the receiver
  14. }
  15.  
  16. void loop()
  17. {
  18. if (irrecv.decode(&results))
  19. {
  20. Serial.println(results.value, HEX);
  21. irrecv.resume(); // Receive the next value
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement