2

I have a use case where the Movesense sensor will be used occasionally (say, an hour a day) and I'd like to maximize battery life. Is there a way to put it into a sleep state, and then wake it in response to some user action? For example, shut off Bluetooth and all sensors but the accelerometer, and then wake them up with the accelerometer detects that it's being moved or tapped.

I see that the Movesense sensor can be put in "PowerOff" or "FullPowerOff" state. In these states is it completely shut down, or is it possible to continue to monitor the accelerometer?

leremjs
  • 973
  • 1
  • 9
  • 25

1 Answers1

0

Yes, it is possible. You can check hr_wakeup_sample:

https://bitbucket.org/suunto/movesense-device-lib/src/887714f3b42496988cce6055b3ccf8b8c99a6846/samples/hr_wakeup_app/?at=master

The device is waking up when you put your fingers to the metal pins (on the bottom).

Also you can change this line:

        asyncPut(WB_RES::LOCAL::COMPONENT_MAX3000X_WAKEUP::ID,
        AsyncRequestOptions(NULL, 0, true), (uint8_t) 1);

https://bitbucket.org/suunto/movesense-device-lib/src/887714f3b42496988cce6055b3ccf8b8c99a6846/samples/hr_wakeup_app/HrWakeupApp.cpp?at=master&fileviewer=file-view-default#HrWakeupApp.cpp-132

to use this API:

https://bitbucket.org/suunto/movesense-device-lib/src/887714f3b42496988cce6055b3ccf8b8c99a6846/MovesenseCoreLib/resources/movesense-api/component/lsm6ds3.yaml?at=master&fileviewer=file-view-default#lsm6ds3.yaml-119

Dotevo
  • 500
  • 5
  • 7
  • Thanks. I replaced that line with this: `asyncPut(WB_RES::LOCAL::COMPONENT_LSM6DS3_WAKEUP::ID, AsyncRequestOptions(NULL, 0, true), (uint8_t) 1, (uint8_t) 5);` but it doesn't seem to wake, no matter how hard I shake it. (Based on what's in lsm6ds3.yaml, I thought those 2 parameters would mean "WAKE_UP (any movement)" when the accelerometer reaches 5 out of 63, but maybe I'm misunderstanding.) – leremjs Jan 10 '18 at 00:35
  • Do you use the newest version? Did you try TAP? I'll check it today. – Dotevo Jan 10 '18 at 08:28
  • I'm using the latest version from the master branch. I tried single tap (value=3) but that didn't work either. – leremjs Jan 10 '18 at 18:05
  • 1
    You had wrong datacontent in PUT. The following code should work (I've tested it): `WB_RES::WakeUpState wakeupState; wakeupState.state = 1; // Any movement wakeupState.level = 2; // ~3% movement 0..63, quite sensitive asyncPut(WB_RES::LOCAL::COMPONENT_LSM6DS3_WAKEUP(), AsyncRequestOptions::Empty, wakeupState);` – PetriL Jan 15 '18 at 08:41