# movesense_exercise Simple Movesense sensor app The functionalities: * Calculates 1s average of sum vector from 3d acceleration data * Offers an API for subscribing to the value * Blinks the LED every time it publishes the calculations * Stops data collection, publicking and blinking if there are no subscribers Requires the Movesense SDK. Follow the instructions at https://bitbucket.org/suunto/movesense-device-lib/src/master/ 1. Install the dependencies: `cmake`, `ninja`, GNU toolchain for ARM embedded and `nrfutil` 2. `git clone git@bitbucket.org:suunto/movesense-device-lib.git` 3. `git clone http://matetelki.eu:3000/denes/movesense_exercise.git` 4. `cd movesense-device-lib` Compile and generate packages with linux inside the SDK: 1. `mkdir excerciseBuild` 2. `cd excerciseBuild` 3. `cmake -G Ninja -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ -DCMAKE_TOOLCHAIN_FILE=../MovesenseCoreLib/toolchain/gcc-nrf52.cmake ../../movesense_exercise` * Add ` -DCMAKE_BUILD_TYPE=Release ` for release builds. 4. Issue `ninja` to compile 5. Create OTA firmware update package with `ninja dfupkg` Run simulations with Windows, inside the SDK: 1. `mkdir simuBuild` 2. `cd simuBuild` 3. `cmake -G "Visual Studio 15 2017" -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ ../../movesense_exercise` 4 `ninja` 5. If you have an account at simbio, download the `acceleration.cvs` test data 6. Run the simulation build: `Debug/Movesense.exe` 7. Subscribe and observe the behaviour from another shell with: `tools/wbcmd (Win).exe --port TCP127.0.0.1:7044 --path /Exercise/Sumvector/Denes --op subscribe` The OTA firmware update package is available at: http://matetelki.eu/movesense_exercise