I have a requirement to take an action (light an LED as an example) if the device is being pinged.
Since the device is responding to the ping with an echo request, there must be a way to intercept this request and implement some sort of hook/action.
Any ideas?
I use a range of devices like esp32, ethernet shields etc.
That depends on how much access you have to the hardware schematics and software. If you write the code you should be able to do it. If the ping resoibse code is buried in the system software maybe.