TroubleshootingGravity

DFR0971 init succeed but no voltage output on Arduino UNO

userHead Massimiliano.Roncone 2024-05-30 02:23:45 74 Views3 Replies

Hi, I'm just trying to check how does it work the DFR0971 I2C module.

 

I executed the following code:

 

#include "DFRobot_GP8403.h"

#include "Wire.h"

 

DFRobot_GP8403 dac(&Wire,0x5F);

 

void setup() {

  Serial.begin(9600);

  while(dac.begin()!=0){

    Serial.println("init error");

    delay(1000);

   }

  Serial.println("init succeed");

  dac.setDACOutRange(dac.eOutputRange10V);

}

 

void loop(){

  dac.setDACOutVoltage(5000, 0);

  delay(5000);

  dac.setDACOutVoltage(2500, 0);

  delay(5000);    

}

 

but I can't read on output channel 0 any voltage (I expected to read a changing voltage from 2.5V to 5.0V or something similar).

 

From serial monitor I can read “init succeed” when program is started.

 

Can someone give me any hint why this is happening?

 

Thank you

Max

2024-05-30 17:34:56

If the begin() function passes, it means that your UNO R3 and DFR0971 have established communication.
If you still cannot get the correct voltage output, the product may be faulty.

userHeadPic Yeez_B
Massimiliano.Roncone wrote:

Thank you for your reply Yeez_B.

 

I can confirm that the communication is established successfully.

 

I tested an example code from library DFRobot_GP8403 and later (after not getting any output voltage) I tested also the library DFRobot_GP8XXX with even a simpler example: same result.

 

If my product is faulty I'd better claim it, I think.

Max

2024-05-30 19:29:58
Yeez_B wrote:

Yes, you can send an email to DFRobot if you purchased the product from the official DFRobot website.
Or seek after-sales service from the distributor.

2024-05-31 13:38:15
2 Replies