I am trying to replicate the Motion recognition based on Seeed XIAO BLE Sense project from hackster-io with my new XIAO BLE SENSE,
Motion recognition based on Seeed XIAO BLE Sense - Hackster.io but the code V3.ino provided has issue with include libraries!
#include <XIAO-BLE-gestures_inferencing.h>
#include <Arduino_LSM6DS3TR_C.h>
#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
#include <bluefruit.h>
#include <Adafruit_LittleFS.h>
#include <InternalFileSystem.h>
The Arduino shows lots of errors, it can not find the bluefruit and Adafruit_LittleFS and InternalFileSystem!!!
I have the latest Arduino IDE and installed xiao ble sense version 2.6.1. but there is no libraries mentioned and nor I can install them from the Arduino library manager!
I see also the code is a mix-up and made-up from another code Bluefruit Feather52 from Adafruit Industries
// Configure and Start Device Information Service
bledis.setManufacturer("Adafruit Industries");
bledis.setModel("Bluefruit Feather52");
bledis.begin();
The other strange thing is they train code from Gyro values but they run it from accelerator !!! :
here is the code for training :
void loop() {
if (millis() > last_interval_ms + INTERVAL_MS) {
last_interval_ms = millis();
Serial.print(myIMU.readFloatGyroX() * CONVERT_G_TO_MS2,4);
Serial.print('\t');
Serial.print(myIMU.readFloatGyroY() * CONVERT_G_TO_MS2,4);
Serial.print('\t');
Serial.println(myIMU.readFloatGyroZ() * CONVERT_G_TO_MS2,4);
}
here is the code for running the model:
void loop()
{
uint8_t buf1[64]=“idle”;
uint8_t buf2[64]=“circle”;
uint8_t buf3[64]=“swing”;u8g2.clearBuffer(); u8g2.setFont(u8g2_font_ncenB08_tr); ei_printf("\nStarting inferencing in 2 seconds...\n"); delay(2000); ei_printf("Sampling...\n"); // Allocate a buffer here for the values we'll read from the IMU float buffer[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE] = { 0 }; for (size_t ix = 0; ix < EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE; ix += 3) { // Determine the next tick (and then sleep later) uint64_t next_tick = micros() + (EI_CLASSIFIER_INTERVAL_MS * 1000); IMU.readAcceleration(buffer[ix], buffer[ix + 1],buffer[ix + 2]); buffer[ix + 0] *= CONVERT_G_TO_MS2; buffer[ix + 1] *= CONVERT_G_TO_MS2; buffer[ix + 2] *= CONVERT_G_TO_MS2; delayMicroseconds(next_tick - micros()); }
Am I missing something here ?? This Motion recognition based on Seeed XIAO BLE Sense project at hackster-io is a from official seeed account? or it is a fake account?
If it is an official seeed, they do not run the code even once?
The code neither compiles nor is correct !!!