I'm currently working on a project that involves using an IR receiver with the ATtiny402 microcontroller. I'm using the IRremote library to capture IR data from a remote control, but I've encountered a problem where I'm not receiving any IR data despite following the library's guidelines and wiring instructions.
Here's a simplified version of my code:
#define IR_RECEIVE_PIN 2
#define TRACE
#include <TinyIRReceiver.hpp>
void handleReceivedTinyIRData(uint8_t address, uint8_t command, uint8_t isRepetition) {
Serial.println("Received IR data!");
}
void setup() {
Serial.begin(9600);
if (!initPCIInterruptForTinyReceiver()) {
// Handle error if interrupt initialization fails
}
}
void loop() {
// Other loop logic
}
I've implemented the handleReceivedTinyIRData function to process the received IR data. However, I noticed that this function is not being called at all, even though I can see some traces when using the #define TRACE option.
I'm seeking the community's expertise to help me troubleshoot this issue. If anyone has experience with using the IRremote library on ATtiny microcontrollers, specifically ATtiny402, and has encountered a similar problem or has any insights, I would greatly appreciate your input.
Thank you in advance for your help and guidance!