This commit is contained in:
lewishe 2023-11-16 14:48:18 +08:00
commit 491316ee88
9 changed files with 37 additions and 36 deletions

View file

@ -59,13 +59,13 @@ void setup()
display.init();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS, SPI_MOSI, SPI_MISO, SPI_SCK)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -47,13 +47,13 @@ void setup()
initBoard();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -62,13 +62,13 @@ void setup()
display.flipScreenVertically();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -46,13 +46,13 @@ void setup()
initBoard();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -77,13 +77,13 @@ void setup()
while (!Serial);
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -49,13 +49,14 @@ void setup()
while (!Serial);
initBoard();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -43,13 +43,13 @@ void setup()
initBoard();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -47,13 +47,13 @@ void setup()
initBoard();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);

View file

@ -55,13 +55,13 @@ void setup()
initBoard();
// Initialize SPI bus, SDCard shares SPI bus with QMI8658
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
pinMode(SPI_CS, OUTPUT); //sdcard pin set high
digitalWrite(SPI_CS, HIGH);
if (!qmi.begin(IMU_CS)) {
// 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, SDSPI)) {
Serial.println("Failed to find QMI8658 - check your wiring!");
while (1) {
delay(1000);