33#include "SensorQMI8658.hpp"
34#ifdef ARDUINO_T_BEAM_S3_SUPREME
35#include <XPowersAXP2101.tpp>
90#if defined(ARDUINO_T_BEAM_S3_SUPREME)
92 power.
begin(Wire1, AXP2101_SLAVE_ADDRESS, 42, 41);
96 power.setALDO1Voltage(3300); power.enableALDO1();
97 power.setALDO2Voltage(3300); power.enableALDO2();
110 Serial.print(
"Detected Pedometer event : ");
116 Serial.begin(115200);
125#if defined(SPI_MOSI) && defined(SPI_SCK) && defined(SPI_MISO)
133 Serial.println(
"Failed to find QMI8658 - check your wiring!");
140 Serial.print(
"Device ID:");
150 uint16_t ped_sample_cnt = 50;
152 uint16_t ped_fix_peak2peak = 200;
154 uint16_t ped_fix_peak = 100;
157 uint16_t ped_time_up = 200;
160 uint8_t ped_time_low = 20;
166 uint8_t ped_time_cnt_entry = 10;
168 uint8_t ped_fix_precision = 0;
170 uint8_t ped_sig_count = 4;
183 Serial.println(
"Enable pedometer failed!");
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 configPedometer(uint16_t sample_count, uint16_t peak_to_peak, uint16_t peak_threshold, uint16_t time_up, uint8_t time_low=20, uint8_t entry_count=10, uint8_t fix_precision=0, uint8_t sig_count=4)
Configure pedometer parameters.
void setPedometerEventCallBack(EventCallBack_t cb)
uint8_t getChipID() override
Get the chip ID / WHO_AM_I value.
bool enablePedometer(IntPin pin=IntPin::DISABLE)
Enable pedometer.
bool configAccelerometer(AccelRange range, AccelODR odr, LpfMode lpfOdr=LPF_MODE_0)
Configure the accelerometer.
uint32_t getPedometerCounter()
Get the Pedometer counter.
uint16_t update()
Update sensor status and process events.
bool enableAccelerometer()
Enable the accelerometer.