Help writing a library that decodes IR remotes

Hello, I'm trying to write a library that decodes signals from a433 MHz RF remote. I've plugged in the receiver and I can see some data being sent, as you can see from the image.
The protocol of the remote is known:

However, I have these questions:

  • how can I distinguish noise from real data?
  • how can I read the data from the sensor? (I've seen that most libraries use an interrupt, but then, what happens if there are two ones? Obviously I could save the timestamp / look every x us) And this brings me to:
  • How can I know when a bit should come?

Attached below you'll find my code and a screenshot of the serial plotter

void setup() {
  pinMode(8, INPUT);
  Serial.begin(115200);

}

void loop() {
  if (!digitalRead(7)) {
    /*Serial.print(micros());
    Serial.print(", ");*/
    Serial.println(analogRead(A1));
  }
}

Look at IRMP GitHub - IRMP-org/IRMP: Infrared Multi Protocol Decoder it supports also RF remotes.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.