33#include "SensorQMI8658.hpp"
34#include <MadgwickAHRS.h>
35#ifdef ARDUINO_T_BEAM_S3_SUPREME
36#include <XPowersAXP2101.tpp>
95#if defined(ARDUINO_T_BEAM_S3_SUPREME)
97 power.begin(Wire1, AXP2101_SLAVE_ADDRESS, 42, 41);
101 power.setALDO1Voltage(3300); power.enableALDO1();
102 power.setALDO2Voltage(3300); power.enableALDO2();
109 Serial.begin(115200);
118#if defined(SPI_MOSI) && defined(SPI_SCK) && defined(SPI_MISO)
126 Serial.println(
"Failed to find QMI8658 - check your wiring!");
135 Serial.print(
"Device ID:");
221 Serial.println(
"Read data now...");
227 float roll, pitch, heading;
241 pitch =
filter.getPitch();
242 heading =
filter.getYaw();
243 Serial.print(
"Orientation: ");
244 Serial.print(heading);
248 Serial.println(roll);
bool begin(CommInterface interface, SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_callback, uint8_t addr=0)
Initialize the sensor using custom callback interface.
QMI8658 IMU sensor driver class.
bool getGyroscope(float &x, float &y, float &z)
Get the raw gyroscope data.
void dumpCtrlRegister()
Dump the control register values.
uint8_t getChipID() override
Get the chip ID / WHO_AM_I value.
bool configAccelerometer(AccelRange range, AccelODR odr, LpfMode lpfOdr=LPF_MODE_0)
Configure the accelerometer.
bool configGyroscope(GyroRange range, GyroODR odr, LpfMode lpfOdr=LPF_MODE_0)
Configure the gyroscope.
bool enableGyroscope()
Enable the gyroscope.
bool enableAccelerometer()
Enable the accelerometer.
bool getDataReady()
Check if new data is available.
bool getAccelerometer(float &x, float &y, float &z)
Get the accelerometer data.
uint32_t microsPerReading