Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By brutzler
#26804 Just trying to use a rotary encoder on my NodeMCU.

But I am struggling with the interupts.
With an UNO there I could use only Interrupt 0/1 on Pin 2/3
Calling like this:
Code: Select all  attachInterrupt(0, doEncoderA, CHANGE);

In the Reference of ESP/Arduino I have seen this:
Pin interrupts are supported through attachInterrupt, detachInterrupt functions. Interrupts may be attached to any GPIO pin, except GPIO16. Standard Arduino interrupt types are supported: CHANGE, RISING, FALLING.


But I am missing the relation between interrupt and pin-number :?
What is the right interrupt, if I want to use GPIO4?