I need to do an interrupt when GPIO 15 goes high.
#include "PinChangeInterrupt.h"
attachInterrupt(digitalPinToInterrupt(15), Abort_Dect, RISING);
The code does not work, so what am I going wrong?
I need to do an interrupt when GPIO 15 goes high.
#include "PinChangeInterrupt.h"
attachInterrupt(digitalPinToInterrupt(15), Abort_Dect, RISING);
The code does not work, so what am I going wrong?
according to the docs: https://docs.arduino.cc/language-reference/en/functions/external-interrupts/attachInterrupt/
you can use pins 0,1,2,3,7 (Leonardo line in the docs since it uses the 32u4)
You are including PinChangeInterrupt.h but not using it.
attachPinChangeInterrupt(digitalPinToPinChangeInterrupt(15), Abort_Dect, RISING);
Thanks oqibidipo I will try your suggested code shortly.
Thank you for sharing your wisdom.
One more question if I may. Is there a way to check if the interrupt is enabled using the PinChangeInterrupt library?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.