In my sketch I have set 3 interrupts on 3 different pins in order to wake up my arduino.
One pin is attached to a push button, one to a 555 5 minute timer and one to the the Serial1 Rx pin.
These interrupts are waking up the arduino as expected however I can’t seem to find a way to determine which pin woke it up.
Serial.println statements don’t seem to work - probably not surprising in an ISR routine.
I can’t save a specific value to my SD card because SD library is not initialised.
And presumably I will have the same problem with saving a value to EEPROM…apart from the issue of limited writes.
And any global variables are apparently reset when the sketch restarts.
So is there any way I can store a value some where to tell me, in setup() and loop(), which pin/interrupt was responsible for waking up the arduino?
My issue is that I want to turn an LCD screen off immediately unless the arduino was woken manually via the push button.