The IMU interrupt pin is connected to the Artemis on the OLA so, in theory, it would be possible for the IMU to wake the Artemis from sleep when a motion event occurs.
The software does not support this at the moment. Depending on your software skills, you may be able to implement it yourself (and send us a Pull Request please)? Or, please raise a “Feature Request” issue on GitHub and we will consider it:
Effectively, the INT pin of the IMU is connected to the D37 of the MCU.
In the IMU’s data-sheet, I can see that there is an interrupt name : Wake On Motion.
How does it work ? When the IMU moves the interrupt is activated ?
I thought about a solution and it can be this :
Wake up the Artemis thanks to the Wake On Motion interrupt from IMU
Put the Artemis on sleep mode if data from the IMU shows that it’s not moving or very few.
Programming the Artemis it’s pretty easy I think, just need to change the Firmware from the github and then flash the new Firmware thanks to the Firmware Updater.
But how can I enable the Wake On Motion interrupt of the IMU ? I have no clue
I’ve a little question, when the MCU goes to Sleep or Deep Sleep mode, will the sensor goes to Sleep or LP mode too? Or should this be explicity done by the MCU? (The goal is save power as much as possible)
I guess it depends what you are trying to achieve. Certainly you will need to leave the IMU power enabled when the Artemis calls goToSleep. You will need to change this part of the code:
After that, you need to learn the features of the IMU and work out what mode you need to put it into that will best meet your needs. Does it have a low-power mode where it can still generate interrupts when moved?