I want to make a system consisting of two ESP32 communication via ESPnow. On the master side is a emergency button activating a relay on the slave side. I have made a code which does this. I also want to implement the following:
The relay gets activated when the master ESP is turned off or the espnow connection is lost.
You can establish 2 way communications between the ESP32 which would allow the slave to periodically send a request for a response to the master.
If no response is received then the connection has been broken for whatever reason, including the master having been turned off, and you can take the appropriate action