Closed LoJunKai closed 2 years ago
Create new functions for getAccelData(), getGyroData(), getAccelGyroData() which will also return the timestamp of the sensor data.
getAccelData()
getGyroData()
getAccelGyroData()
Usage: For getAccelData() and getGyroData(),
int16_t accel[3] = {0}; uint32_t timestamp; bmi160.getAccelData(accel, ×tamp);
For getAccelGyroData(),
int16_t accelGyro[6] = {0}; uint32_t timestamp[2] = {0}; bmi160.getAccelGyroData(accelGyro, timestamp);
Do note that to convert timestamp to relative time lapsed in seconds, do the following: (timestamp * 39) / 1000000.0 as BMI160 sensortime is a 39µs resolution time stamp generated by a real-time clock. Source.
(timestamp * 39) / 1000000.0
Thanks for your suggestion.
Create new functions for
getAccelData()
,getGyroData()
,getAccelGyroData()
which will also return the timestamp of the sensor data.Usage: For
getAccelData()
andgetGyroData()
,For
getAccelGyroData()
,Do note that to convert timestamp to relative time lapsed in seconds, do the following:
(timestamp * 39) / 1000000.0
as BMI160 sensortime is a 39µs resolution time stamp generated by a real-time clock. Source.