Interrupt LowPower Mode using an IMU

Again thank you for your help.

What I want it to do, is to sleep the entire time if the acceleration signal does not exceed a specific value.

Any value below 60% is LOW.

Would that mean that I need to check if the acceleration is above a specific limit?

Let's assume that I want the controller the following thing to do:

  1. If the sensor rests, the system is put to sleep and LED 13 is put LOW
  2. if the sensor is moved, LED 13 is put HIGH
  3. if the sensor rests, resume to state 1.

That would mean:

  • loop() contains the command to put everything to sleep for an undefined period of time, also setting LED 13 LOW
  • attachInterrupt(0,wake,RISING) calls a function "wake" that wakes the system once the input of 0 is rising
  • as soon as the RISING state is finished, everything retuns to sleep by continuing loop()

I am sorry for my poor understanding of how these things work, however I really want to get into it and I don't see the mistake in the way of thinking yet. Again thank you.