diff --git a/README.md b/README.md new file mode 100644 index 0000000..c2cdb5e --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Required Libraries for compilation + + # Encoder by Paul Stoffregen + https://docs.arduino.cc/libraries/encoder + + # IRremote by shirriff, z3t0, ArminJo + https://docs.arduino.cc/libraries/irremote diff --git a/ax2358f.h b/ax2358f.h index e847cf0..fc3a2b5 100644 --- a/ax2358f.h +++ b/ax2358f.h @@ -1,8 +1,6 @@ #ifndef ax2358f_H_ #define ax2358f_H_ -#include -#include -#include +#include #include #include diff --git a/ax2358f.ino b/ax2358f.ino index 4e8d4ed..ce57810 100644 --- a/ax2358f.ino +++ b/ax2358f.ino @@ -18,12 +18,11 @@ byte serialLength = 0; //Encoder encMain(ENC_A, ENC_B); IRrecv irReceiver(IR); -decode_results res; //The setup function is called once at startup of the sketch void setup() { Serial.begin(SERIAL_SPEED); - irReceiver.enableIRIn(); + irReceiver.begin(IR, ENABLE_LED_FEEDBACK); Wire.begin(); pinMode(LED_CLK, OUTPUT); @@ -86,8 +85,8 @@ void loop() { encPosition = encNew; } #endif // End of comment by jithin - if (irReceiver.decode(&res)) { - handleInfrared(res.value); + if (irReceiver.decode()) { + handleInfrared(irReceiver.decodedIRData.decodedRawData); delay(30); irReceiver.resume(); }