Hi @tristar !
TL; DR - maybe. It depends if the interrupt line is wired between MPU6886 and ESP32.
There are two questions to answer to know if this method will work with the M5-Grey:
- Does it have the MPU6886?
A: Yes! - Is the interrupt line coming out of the MPU6886 wired in to one of the ESP32 pins that can be used to wake from deep sleep?
A: Unsure. This isn't clearly outlined in the schematic here: https://docs.m5stack.com/#/en/core/gray
I wrote some library code to enable this on the M5StickC which is now included in the latest Arduino library here:
https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp#L101
I'm happy to suggest or review code so you can test this. Are you using the actual Arduino IDE or something different? It should be straightforward to test with a development version of the library either way.
Cheers,
Dave