#include //As IRTest3 with code irrelevaant to the Arduino uno/nano deleted. #define IR_INPUT_PIN 3 #include "TinyIRReceiver.cpp.h" #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) #define IRBTN_OK 0x1C //Elegoo OK button 0x40, ebay OK 0x1C void setup() { Serial.begin(9600); initPCIInterruptForTinyReceiver(); } void loop() { } //This function is called if a complete command was received void handleReceivedTinyIRData(uint16_t aAddress, uint8_t aCommand, bool isRepeat) { //Print only very short output, since we are in an interrupt context and do not want to miss the next interrupts of the repeats coming soon Serial.print(F("A=0x")); Serial.print(aAddress, HEX); Serial.print(F(" C=0x")); Serial.print(aCommand, HEX); Serial.print(F(" R=")); Serial.print(isRepeat); if(aCommand == IRBTN_OK){Serial.print("OK");} Serial.println(); }