hwthinker

tes Remote

Nov 13th, 2021 (edited)
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // library  https://github.com/Arduino-IRremote/Arduino-IRremote
  2. // this code is modified by hwthinker
  3.  
  4. #include <IRremote.h>
  5. int RECV_PIN = 6; //mendifiniskan pin IR receiver
  6. IRrecv irrecv(RECV_PIN);
  7. decode_results results;
  8. void setup ()
  9. {
  10.   Serial.begin(9600);
  11.   irrecv.enableIRIn(); // Start the receiver
  12.  
  13.   for (uint8_t i = 9; i < 14; i++)
  14.     digitalWrite(i, LOW);
  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. }
  24.  
  25.  
  26.  
Add Comment
Please, Sign In to add comment