Advertisement
Guest User

Untitled

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