Advertisement
computermuseo

Untitled

Oct 5th, 2016
1,799
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <IRremote.h>
  2.  
  3. int RECV_PIN = 2;
  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. irrecv.resume(); // Receive the next value
  19. }
  20. delay(100);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement