Hello, from the schematic for ESP32-S3 Think Plus, a set of pins have been assigned for the SDIO 4-bit SD card. According to the diagram, I have:
int clk = 38;
int cmd = 34;
int d0 = 39;
int d1 = 40;
int d2 = 47;
int d3 = 33;
Writing data to SD card via the SDIO 4-bit protocol works fine.
I also have a program which obtains the orientation from Adafruit BNO055 Qwiic sensor:
I defined it using:
Adafruit_BNO055 bno = Adafruit_BNO055(55, 0x28, &Wire);
That program also worked fine.
However, when I combined the two programs together, the BNO055 always gives 0 as the orientation. I noticed that if I temporarily remove the following:
if (!SD_MMC.begin()) {
Serial.println("Card Mount Failed");
return;
}
The sensor outputed the correct values. However, once I put the above block of code back, the sensor outputs 0 as the orientation even I rotated it. Is there some kind of conflict between SDIO SSD and this QWIIC device? Strangly, even the BNO055 have 0x28 and 0x29 as acceptable address, having:
Adafruit_BNO055 bno = Adafruit_BNO055(55, 0x29, &Wire);
cased the below code to be true and error messaged printed on the Serial Monitor.
if(!bno.begin())
{
/* There was a problem detecting the BNO055 ... check your connections */
Serial.print("Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!");
while(1);
}
It seems that there is some kind of conflict between SDIO and I2C but I donât know why and how to fix this problem. Could you please help?