ESP-12F (ESP8266) interrupt for RC-Switch library 433Mhz signal

Hello friends

I want to modify this Arduino code for esp8266 – ESP-12F.

(It's RC-Switch Sample)

mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin #2

I try code by "D2" and connect module to pin D4.
it's work but built blue LED always show fast pulse.
I'm not sure but I think it's not stable because it's need to define interrupt and some code.
I want stable code for use interrupt to read RF433/315Mhz module in loop by ESP-12F as same as Arduino code.

Thanks :pray:
Armen

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin
}
void loop() {
if (mySwitch.available()) {
output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
mySwitch.resetAvailable();
Serial.println();
}
}

I moved your topic to a more appropriate forum category @Rmen.

The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.

In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.

Thanks in advance for your cooperation.

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