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

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

userHead Jean-Philippe.Encausse 2025-04-17 22:38:43 68 Views5 Replies

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 :-/

2025-04-18 15:43:58

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 ???

userHeadPic Jean-Philippe.Encausse
2025-04-18 07:06:39

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é. 

userHeadPic AngryRobot
Jean-Philippe.Encausse wrote:

Oui sur PlatformIO
https://community.platformio.org/t/esp-32-ai-cam-requirement-for-platformio-v3/46930/2

2025-04-19 03:50:33
1 Replies
2025-04-18 01:59:50

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);
}

userHeadPic ahsrab.rifat
ahsrab.rifat wrote:

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

 


 

2025-04-18 19:21:53
1 Replies