33#include "SensorQMI8658.hpp"
34#ifdef ARDUINO_T_BEAM_S3_SUPREME
35#include <XPowersAXP2101.tpp>
92#if defined(ARDUINO_T_BEAM_S3_SUPREME)
94 power.begin(Wire1, AXP2101_SLAVE_ADDRESS, 42, 41);
98 power.setALDO1Voltage(3300); power.enableALDO1();
99 power.setALDO2Voltage(3300); power.enableALDO2();
105 Serial.begin(115200);
114#if defined(SPI_MOSI) && defined(SPI_SCK) && defined(SPI_MISO)
122 Serial.println(
"Failed to find QMI8658 - check your wiring!");
129 Serial.print(
"Device ID:");
209 pinMode(IMU_IRQ2, INPUT);
219 Serial.println(
"Read data now...");
231 Serial.print(
" -> [");
232 Serial.print(millis());
233 Serial.print(
"]: -<HEX> ");
234 Serial.print(status);
235 Serial.print(
" -<BIN> ");
236 Serial.println(status, BIN);
239 Serial.print(
"{ACCEL: ");
249 Serial.print(
"{GYRO: ");
252 Serial.print(
gyr.
y );
257 Serial.print(
"\t\t\t\t > ");
261 Serial.println(
"*C");
268 if (digitalRead(
IMU_IRQ) == HIGH) {
273 if (digitalRead(IMU_IRQ2) == HIGH) {
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 getIrqStatus()
Get the IRQ status.
uint8_t getChipID() override
Get the chip ID / WHO_AM_I value.
void enableINT(IntPin pin, bool enable=true)
Enable or disable the interrupt.
void enableDataReadyINT(bool enable=true)
Enable or disable the Data Ready interrupt.
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.
uint32_t getTimestamp() override
Get the timestamp from the sensor.
bool enableAccelerometer()
Enable the accelerometer.
bool getAccelerometer(float &x, float &y, float &z)
Get the accelerometer data.
void readSensorData(const char *name)