M5Unit-IMU 0.0.2 git rev:e5b00aa
Loading...
Searching...
No Matches
m5::unit::sh200q::Data Struct Reference

One measurement (14 bytes burst from REG_OUTPUT, little-endian – NOT the MPU byte order) More...

#include <unit_sh200q_data.hpp>

Public Member Functions

float temperature () const
 Temperature in degC (T = adc/333.87 + 21.0)
 
Raw ADC values
int16_t accel_x () const
 Raw accelerometer X.
 
int16_t accel_y () const
 Raw accelerometer Y.
 
int16_t accel_z () const
 Raw accelerometer Z.
 
int16_t gyro_x () const
 Raw gyroscope X.
 
int16_t gyro_y () const
 Raw gyroscope Y.
 
int16_t gyro_z () const
 Raw gyroscope Z.
 
int16_t temp_adc () const
 Raw temperature ADC.
 

Public Attributes

std::array< uint8_t, 14 > raw {}
 [0..5] accel, [6..11] gyro, [12..13] temp
 

Detailed Description

One measurement (14 bytes burst from REG_OUTPUT, little-endian – NOT the MPU byte order)

Member Function Documentation

◆ temperature()

float m5::unit::sh200q::Data::temperature ( ) const
inline

Temperature in degC (T = adc/333.87 + 21.0)

Warning
The datasheet documents no conversion formula; these coefficients come from the original M5StickC library (identical to the MPU6500/6886 formula) – treat the absolute value as approximate