Advertisement
RuiViana

IR_Monitor

Dec 27th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <IRLib.h>
  2.  
  3. //Create a receiver object to listen on pin 11
  4. IRrecv My_Receiver(11);
  5.  
  6. //Create a decoder object
  7. IRdecode My_Decoder;
  8.  
  9. void setup()
  10. {
  11. Serial.begin(9600);
  12. My_Receiver.enableIRIn(); // Start the receiver
  13. }
  14.  
  15. void loop() {
  16. //Continuously look for results. When you have them pass them to the decoder
  17. if (My_Receiver.GetResults(&My_Decoder)) {
  18. My_Decoder.decode(); //Decode the data
  19. My_Decoder.DumpResults(); //Show the results on serial monitor
  20. My_Receiver.resume(); //Restart the receiver
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement