esp32 idf gpio interrupt example, and each email you receive will include easy unsubscribe options.