Wemos D1 Mini Pro Digital Interrupt Pins
I was observing weird behavior when trying to handle interrupts from certain pins on a WEMOS D1 mini Pro.
Goal
- Register ISRs for rising and falling edges on as many pins as possible
- Keep a stable system
- Keep I²C functionality
TL;DR
- The pins D5, D6, D7 work without restrictions
- D3 and D4 work, but can not be low on boot, otherwise the WEMOS freezes12
- D1 and D2 are used for I²C by default3, not changed for compability
- D04 and D85 have no support for interrupts
Implementation
ICACHE_RAM_ATTR void my_isr(){ /* ... */ }
void setup() {
pinMode(MY_INT_PIN, INPUT_PULLUP);
attachInterrupt(MY_INT_PIN, my_isr, CHANGE);
}
-
Could not find a reference. Did not work for me. ↩︎