sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.89k stars 653 forks source link

Adjustments to esp8266 #449

Open joroMaser opened 2 years ago

joroMaser commented 2 years ago
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

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

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

Doesn't receive any data.

Jadyla commented 1 year ago

Hey! Try to use the number of GPIO, not D2: mySwitch.enableReceive(4);. I'm working on this and also was using D2. When I make that change, it works :)

You can just google "esp8266 pinout" to see the GPIOs numbers.