sui77 / rc-switch

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

Exception when assigning interrupt on ESP32 / LilyGo TTGO T-Journal #402

Open MaxBlasto opened 3 years ago

MaxBlasto commented 3 years ago

I try to use RC-Switch on an ESP32 with camera, to take a photo when a certain RF signal is received. The board is a LilyGo TTGO T-Journal. Most pins are in use for the camera and the display, but there are 4 GPIO pins left (2, 4, 13, 14). Arduino IDE treats it as an "ESP32 Dev Module".

I have RC-Switch running nicely on another ESP32 board (latest version, just updated today).

Unfortunately, when I try to run it on the LilyGo, after uploading, it throws an exception that traces back to line 563 in RCSwitch.cpp: attachInterrupt(this->nReceiverInterrupt, handleInterrupt, CHANGE);

It does not matter which GPIO pin I specify for enableReceive, the exception occurs every time (I even tried nonsense pin numbers). With my other board, when listening on wrong pins, I simply got silence and no exception.

I'll happily provide more information, but I'm just getting started with ESP32 programming and should be considered a "n00b".