Here is the code from the example:
Serial.println("accelerometer not found");
state = SLEEP_STATE;
state = BOOT_WAIT_STATE;
My interpretation: When setting the accelerometer into low power wake mode, if it was successful it will return a zero. This means the accelerometer isn’t found, as expected since it’s in sleep/standby, hence the print command. In that case, it’s ready to do a wake command if needed, so it is ok to go to sleep. Otherwise, the accelerometer WakeMode didn’t work, so go through other routines instead.
Something still isn’t clicking for me. Do I need to set the LowPowerWakeMode after every time it sends a wake command (so it is kicked out of that mode after it is triggered my movement)? In that example I only see it going to RESET_STATE one time as the code is first initialized. Is that correct? I’m not understanding the use of this case in that example. If the command was successful or not, I don’t see it ever getting called again as it goes to either BOOT_WAIT_STATE or SLEEP_STATE which never get back to calling the statement again.
Sorry for what I’m sure sounds like novice questions. Also thanks for pointing me at the reference material. I should have already gone through that but missed it. My bad