I'am playing with an LSM6DSO32 with an SAMD21 and I use Adafruit library for LSM6DSO32 https://github.com/adafruit/Adafruit_LSM6DS but it's verry slow I have 3ms delay for this line of code :
Code: Select all
SerialUSB.println(millis());
dso32.getEvent(&accel_dso, &gyro_dso, &temp_dso);
SerialUSB.println(millis()); //3ms here just to read register and do some math....
this is huge no ?? Is it notmal ? My sensor is set to 416Hz data rate by
Code: Select all
LSM6DS_RATE_416_HZ
So I can't run my code up to 333Hz because in each loop iteration I have a minimum of 3ms just for getEvent...
Edit : for information I set my i2c to high speed with
Code: Select all
Wire.setClock(400000UL);