33#include "SensorQMI8658.hpp"
34#ifdef ARDUINO_T_BEAM_S3_SUPREME
35#include <XPowersAXP2101.tpp>
97#if defined(ARDUINO_T_BEAM_S3_SUPREME)
99 power.
begin(Wire1, AXP2101_SLAVE_ADDRESS, 42, 41);
100 power.disableALDO1();
101 power.disableALDO2();
103 power.setALDO1Voltage(3300); power.enableALDO1();
104 power.setALDO2Voltage(3300); power.enableALDO2();
113 Serial.println(
"Single-TAP");
116 Serial.println(
"Double-TAP");
125 Serial.begin(115200);
134#if defined(SPI_MOSI) && defined(SPI_SCK) && defined(SPI_MISO)
142 Serial.println(
"Failed to find QMI8658 - check your wiring!");
149 Serial.print(
"Device ID:");
190 uint16_t dTapWindow = 250;
193 float alpha = 0.0625;
198 float peakMagThr = 0.8;
204 dTapWindow, alpha, gamma, peakMagThr, UDMTh);
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.
uint8_t getChipID() override
Get the chip ID / WHO_AM_I value.
void setTapEventCallBack(EventCallBack_t cb)
bool configTap(TapPriority priority, uint8_t peak_window, uint16_t tap_window, uint16_t double_tap_window, float peak_mag_threshold, float quiet_threshold)
Configure tap detection parameters.
TapEvent getTapStatus()
Get tap status.
bool configAccelerometer(AccelRange range, AccelODR odr, LpfMode lpfOdr=LPF_MODE_0)
Configure the accelerometer.
bool enableTap(IntPin pin=IntPin::PIN1)
Enable tap detection.
uint16_t update()
Update sensor status and process events.
bool enableAccelerometer()
Enable the accelerometer.