Updated example, compatible with QMC6310N

This commit is contained in:
lewisxhe 2026-01-14 16:10:35 +08:00
commit 0779b8289a
19 changed files with 114 additions and 123 deletions

View file

@ -53,7 +53,7 @@ void setup()
// SDCard shares SPI bus with QMI8658
// SPI has been initialized in initBoard.
// Only need to pass SPIhandler to the QMI class.
if (!qmi.begin(IMU_CS, -1, -1, -1, SDCardSPI)) {
if (!qmi.begin(SDCardSPI, IMU_CS)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);
@ -91,9 +91,7 @@ void setup()
* LPF_MODE_2 //5.39% of ODR
* LPF_MODE_3 //13.37% of ODR
* */
SensorQMI8658::LPF_MODE_0,
// selfTest enable
true);
SensorQMI8658::LPF_MODE_0);
qmi.configGyroscope(
@ -125,9 +123,7 @@ void setup()
* LPF_MODE_2 //5.39% of ODR
* LPF_MODE_3 //13.37% of ODR
* */
SensorQMI8658::LPF_MODE_3,
// selfTest enable
true);
SensorQMI8658::LPF_MODE_3);
// In 6DOF mode (accelerometer and gyroscope are both enabled),