33#include "SensorQMI8658.hpp"
34#ifdef ARDUINO_T_BEAM_S3_SUPREME
35#include <XPowersAXP2101.tpp>
101#if defined(ARDUINO_T_BEAM_S3_SUPREME)
102 XPowersAXP2101 power;
103 power.begin(Wire1, AXP2101_SLAVE_ADDRESS, 42, 41);
104 power.disableALDO1();
105 power.disableALDO2();
107 power.setALDO1Voltage(3300); power.enableALDO1();
108 power.setALDO2Voltage(3300); power.enableALDO2();
114 Serial.begin(115200);
123#if defined(SPI_MOSI) && defined(SPI_SCK) && defined(SPI_MISO)
131 Serial.println(
"Failed to find QMI8658 - check your wiring!");
138 Serial.print(
"Device ID:");
149 pinMode(
IMU_IRQ, INPUT_PULLUP);
164 Serial.print(
"STATUS:"); Serial.print(status);
165 Serial.print(
" BIN:"); Serial.println(status, BIN);
168 Serial.println(
"EVENT_SIGNIFICANT_MOTION");
170 Serial.println(
"EVENT_NO_MOTION");
172 Serial.println(
"EVENT_ANY_MOTION");
174 Serial.println(
"EVENT_PEDOMETER_MOTION");
176 Serial.println(
"EVENT_WOM_MOTION");
178 Serial.println(
"EVENT_TAP_MOTION");
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.
@ EVENT_SIGNIFICANT_MOTION
void dumpCtrlRegister()
Dump the control register values.
uint8_t getChipID() override
Get the chip ID / WHO_AM_I value.
int getStatusRegister()
Get the Pedometer counter.
bool configWakeOnMotion(uint8_t threshold=200, float odr_hz=128.0f, IntPin pin=IntPin::PIN2)
Configure wake-on-motion (WoM) feature.