Fitness tracking features in Nicla Sense ME

Hi!

According to the datasheet, Nicla Sense ME has Bosch BHI260AP which supports cool features like fitness tracking, swim analytics, etc.

So.. how can I use them?
I've been trying to find documents/tutorials on using fitness tracking features, but no luck.

Any advice or pointers would be much appreciated.

Thank you!

I glanced at the documentation you linked to, so what is you do not understand from the documentation? Begin with the WEB version of the Arduino IDE.

The feature i mentioned - fitness tracking - is not something I try to implement from the scratch, but it's one of the features of BHI260. (they call it "self-learnign AI sensor BHI260 for fitness tracking". Check this for more information)

I was wondering if anyone has used this feature with Nicla Sense ME

Hello!
The Nicla Sense ME uses this library GitHub - arduino-libraries/Arduino_BHY2: Mirror of https://github.com/arduino/nicla-sense-me-fw , please post any issue there to interface the BHI260AP which has some models in it.

The slides that you shared, are the sum of the firmware and the models uploaded on the BHI260, so it is more an user application, rather than a default state of the sensor.

With our library you can get some states called "Activities" where you can get the following states:

  {0,  "Still activity ended"},
  {1,  "Walking activity ended"},
  {2,  "Running activity ended"},
  {3,  "On bicycle activity ended"},
  {4,  "In vehicle activity ended"},
  {5,  "Tilting activity ended"},
  {6,  "In vehicle still ended"},
  {7,  ""},
  {8,  "Still activity started"},
  {9,  "Walking activity started"},
  {10, "Running activity started"},
  {11, "On bicycle activity started"},
  {12, "IN vehicle activity started"},
  {13, "Tilting activity started"},
  {14, "In vehicle still started"},
  {15, ""}

Declared at Arduino_BHY2/SensorActivity.h at main · arduino-libraries/Arduino_BHY2 · GitHub

Get to know how to use it https://docs.arduino.cc/tutorials/nicla-sense-me/cheat-sheet#activity

#include "Arduino_BHY2.h"
SensorActivity activity(SENSOR_ID_AR);

void setup(){
  Serial.begin(115200);

  BHY2.begin();
  activity.begin();
}

void loop(){
  static auto lastCheck = millis();
  BHY2.update();

  if (millis() - lastCheck >= 1000) {
    printTime = millis();
    Serial.println(String("Activity info: ") + activity.toString());
  }
}