Download libraries/RobotIRremote/src/RobotIRremote.h from Beifengdo/Arduino-Development: direct link, hf CLI and curl.
- Browser
- Download file 2.84 kB
-
https://huggingface.co/datasets/Beifengdo/Arduino-Development/resolve/main/libraries/RobotIRremote/src/RobotIRremote.h
- Command line
-
hf download hf://datasets/Beifengdo/Arduino-Development/libraries/RobotIRremote/src/RobotIRremote.h
-
curl -L -o RobotIRremote.h https://huggingface.co/datasets/Beifengdo/Arduino-Development/resolve/main/libraries/RobotIRremote/src/RobotIRremote.h
2.84 kB
| /* | |
| * IRremote | |
| * Version 0.1 July, 2009 | |
| * Copyright 2009 Ken Shirriff | |
| * For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.htm http://arcfn.com | |
| * Edited by Mitra to add new controller SANYO | |
| * | |
| * Interrupt code based on NECIRrcv by Joe Knapp | |
| * http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556 | |
| * Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/ | |
| * | |
| * JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post) | |
| */ | |
| // The following are compile-time library options. | |
| // If you change them, recompile the library. | |
| // If DEBUG is defined, a lot of debugging output will be printed during decoding. | |
| // TEST must be defined for the IRtest unittests to work. It will make some | |
| // methods virtual, which will be slightly slower, which is why it is optional. | |
| // #define DEBUG | |
| // #define TEST | |
| // Results returned from the decoder | |
| class decode_results { | |
| public: | |
| int decode_type; // NEC, SONY, RC5, UNKNOWN | |
| unsigned int panasonicAddress; // This is only used for decoding Panasonic data | |
| unsigned long value; // Decoded value | |
| int bits; // Number of bits in decoded value | |
| volatile unsigned int *rawbuf; // Raw intervals in .5 us ticks | |
| int rawlen; // Number of records in rawbuf. | |
| }; | |
| // Values for decode_type | |
| // Decoded value for NEC when a repeat code is received | |
| // main class for receiving IR | |
| class IRrecv | |
| { | |
| public: | |
| IRrecv(int recvpin); | |
| void blink13(int blinkflag); | |
| int decode(decode_results *results); | |
| void enableIRIn(); | |
| void resume(); | |
| private: | |
| // These are called by decode | |
| int getRClevel(decode_results *results, int *offset, int *used, int t1); | |
| long decodeNEC(decode_results *results); | |
| //long decodeSony(decode_results *results); | |
| //long decodeSanyo(decode_results *results); | |
| //long decodeMitsubishi(decode_results *results); | |
| //long decodeRC5(decode_results *results); | |
| //long decodeRC6(decode_results *results); | |
| //long decodePanasonic(decode_results *results); | |
| //long decodeJVC(decode_results *results); | |
| long decodeHash(decode_results *results); | |
| int compare(unsigned int oldval, unsigned int newval); | |
| } | |
| ; | |
| // Only used for testing; can remove virtual for shorter code | |
| // Some useful constants | |
| // Marks tend to be 100us too long, and spaces 100us too short | |
| // when received due to sensor lag. | |