Can an interrupt wake up a Lolin Wemos from sleep/deepsleep

My Wemos is set to get an interrupt (low->high) on pin D5.
I need to make the board to sleep (light or, better, deep) to save power and to wake up when the interrupt is raised. I read a lot, but I'm more confused then before.
I use the <ESP8266WiFi.h> and <espnow.h libraries (two Wemos talking peer-to-peer over local WiFi)

If the aswer is positive, the other important question is: does the ESP always restart the program at wake up or is there something like a 'resume' (i.e. OnWakeUp(...do...) )
Thanks as always

there are many tutorials for the 8266 sleep modes

here is one

(jump to Wake up Sources paragraph)

if you are using deepsleep, the only way to let the ESP8266 awake is to reset the board. Therefore you have to connect the RST to GPIO16.
Due to the reset the program will start from new.
The other power saving modes don't spare so much energy.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.