sui77 / rc-switch

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

ESP32 WROOM plus probably all ESP32 types #515

Closed buccaneer-jak closed 1 month ago

buccaneer-jak commented 1 month ago

This shows the problem and the solution.

The example code was not working on my ESP32 WROOM until I came across https://stackoverflow.com/questions/63123935/rcswitch-library-seemingly-not-working-for-433-hz-receiver-on-esp32-nodemcu

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

TO pinMode(2, INPUT); mySwitch.enableReceive(digitalPinToInterrupt(2));

fixed my problem although I didn't go through any of the other examples given on that stackoverflow link.