148 Serial.begin(115200);
154 Serial.println(
"Initializing Sensors...");
157 bhy.setFirmware(bosch_firmware_image, bosch_firmware_size);
168#ifdef USE_I2C_INTERFACE
173 Serial.print(
"Failed to initialize sensor - error code:");
174 Serial.println(
bhy.getError());
181#ifdef USE_SPI_INTERFACE
184 Serial.print(
"Failed to initialize sensor - error code:");
185 Serial.println(
bhy.getError());
192 Serial.println(
"Initializing the sensor successfully!");
194#ifdef USING_SENSOR_IRQ_METHOD
210 noMotion.enable(MotionMode::CONTINUOUS);
215 Serial.print(millis());
217 Serial.print(
"No motion detected.");
218 Serial.print(
" state :");
219 Serial.println(
noMotion.isEnabled() ?
"continuous mode" :
"disabled");
222 Serial.println(
"Sensor is ready, please keep the sensor stationary.");