Wakeup gpio rising and falling flank / door contact

Hi,

i want to connect a door contact to cubecell dev board.
The door contanct is NC.
I want to know about a status change.
So i need to wakeup the board on a change from hight to low and from low to high.
Can someone give me a idea to do that.

just look in the examples for interrupt or my source code for LoRaWAN_Multisensor.
there is it used with a rising flank.
you can just change that line of code or add a second trigger for falling flank

attachInterrupt(INT_PIN, accelWakeup, RISING);
attachInterrupt(INT_PIN, accelWakeup, FALLING);

than declare an other function that is triggered by FALLING.
and let it send another value for that trigger.

1 Like

Thanks, for help.
Where i can find your LoRaWAN_Multisensor source code?

It is in the official heltec github repository.
Look in libraries lora …

1 Like