Can't read 433.92 RF data with RX480E

I using ESP8266 (the same question is for Arduino) and RX480E as RF RX and TX118sa-4 v2 as RF TX
I have a RF key with ev1527 and ndr43392.

I want to using esp8266 to read the code from this RF key with RX480E and save it that I can later send this code with the esp8266 and the TX118sa-4 v2 . Like duplicate the key .

First I used this code :

void setup() {
  Serial.begin(9600);
  pinMode(D2, INPUT);
}

void loop() {
  if (digitalRead(D2) == HIGH) 
    Serial.println("press");
}

And I saw that when I press on my RF key lot of "press" in Serial monitor , so I understand that RX got some data from my RF key
That is good...

Now I want to read the data . So I found RCSwitch library that according to documentation support ev1527
There is an example there

So I tried this code:

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(D2);
}

void loop() {
  if (mySwitch.available()) {
   Serial.println("press");
  }
}

But I never saw "press" in serial monitor. Why does the code didn't recognize the press of my RF key?

.
How can I fix that please?

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