33#include "SensorQMI8658.hpp"
34#ifdef ARDUINO_T_BEAM_S3_SUPREME
35#include <XPowersAXP2101.tpp>
99 Serial.print(
"{ACCEL: ");
109 Serial.print(
"{GYRO: ");
112 Serial.print(
gyr.
y );
117 Serial.print(
"\t\t\t\t > ");
121 Serial.println(
"*C");
128#if defined(ARDUINO_T_BEAM_S3_SUPREME)
129 XPowersAXP2101 power;
130 power.begin(Wire1, AXP2101_SLAVE_ADDRESS, 42, 41);
131 power.disableALDO1();
132 power.disableALDO2();
134 power.setALDO1Voltage(3300); power.enableALDO1();
135 power.setALDO2Voltage(3300); power.enableALDO2();
141 Serial.begin(115200);
150#if defined(SPI_MOSI) && defined(SPI_SCK) && defined(SPI_MISO)
158 Serial.println(
"Failed to find QMI8658 - check your wiring!");
164 Serial.print(
"Device ID:");
251 pinMode(
IMU_IRQ, INPUT_PULLUP);
264 Serial.println(
"Read data now...");
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.
float getTemperature_C()
Get the temperature in degree Celsius.
void dumpCtrlRegister()
Dump the control register values.
uint8_t getChipID() override
Get the chip ID / WHO_AM_I value.
void enableINT(IntPin pin, bool enable=true)
Enable or disable the interrupt.
bool enableLockingMechanism()
Enable the data locking mechanism.
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.
uint16_t update()
Update sensor status and process events.
bool enableGyroscope()
Enable the gyroscope.
uint32_t getTimestamp() override
Get the timestamp from the sensor.
void setDataLockingEventCallBack(EventCallBack_t cb)
bool enableAccelerometer()
Enable the accelerometer.
bool getAccelerometer(float &x, float &y, float &z)
Get the accelerometer data.
void lockingMechanismHandler()