attachInterrupt - Question
Posted: Sat Aug 22, 2015 2:46 pm
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:
In the Reference of ESP/Arduino I have seen this:
But I am missing the relation between interrupt and pin-number
What is the right interrupt, if I want to use GPIO4?
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?