How to connect DFR1154 (AI CAM) to SEN0539 (KWS) or DFR0997 (Display)

Hello,
I have DFR1154 that works correctly but it seems (according to ChatGPT) the Gravity connector works ONLY on UART not I2C ?
> Can someone confirm that ? > Is there a work around to use I2C on DFR1154 ?So I want to connect a SEN0539 in UART but the board keep rebooting… Am I missing something ? This basic code reboot the board on loop. #include <DFRobot_DF2301Q.h>
DFRobot_DF2301Q_UART asr(&Serial1, 44, 43);
void setupUART(){
Serial1.begin(DF2301Q_UART_BAUDRATE, SERIAL_8N1, 44, 43);
while (!(asr.begin())) {
Serial.println("Communication with device failed, please check connection");
delay(3000);
}
Serial.println("Begin ok!");
}
void loopUART(){
uint8_t cmd = asr.getCMDID();
if (cmd != 0) {
Serial.printf("CMDID = %u\n", cmd);
}
delay(2000);
}
I also try to connect DFR0997 (Display) but it fails also in UART. Can someone have a working sample code ?
Many thanks ! DFRobot Hardware is great but I lost hours with the software part to make it works in real life :-/
Hi, Thanks but it do not change, the setup() do not trigger errors but the loop() probably crash.
More importantly, I don't understand why DFRobot put a Gravity connector on the ESP-32 AI Camera, which is the only way to connect a sensor. BUT that connector do not work with I2C ???

Bonjour Jean-Philippe, excusez moi de vous le demander comme ca, est-ce que vous arriver à faire fonctionner le micro et le haut parleur sur ce module? J'ai suivi le tutoriel “Recording and Playing Audio” à la lettre mais aucun son ne sort de ce module.. J'ai l'impression d'avoir tout essayé.

Oui sur PlatformIO
https://community.platformio.org/t/esp-32-ai-cam-requirement-for-platformio-v3/46930/2
You can try this code.
#include <DFRobot_DF2301Q.h>
// Use Serial1 with correct pins for FireBeetle 2 ESP32-S3
// Default Serial1 pins: GPIO17 (TX1), GPIO18 (RX1)
DFRobot_DF2301Q_UART asr(&Serial1);
void setup() {
Serial.begin(115200);
Serial1.begin(115200); // SEN0539 default baudrate
while(!asr.begin()) {
Serial.println("Communication failed, check connection");
delay(1000);
}
Serial.println("Begin ok!");
}
void loop() {
uint8_t cmd = asr.getCMDID();
if(cmd != 0) {
Serial.print("Detected command: ");
Serial.println(cmd);
}
delay(100);
}

As far as I know, the Gravity connector on DFR1154 supports both I2C and UART, but not simultaneously for the same pins.