DFR0971 init succeed but no voltage output on Arduino UNO
![userHead](https://dfimg.dfrobot.com/dfPortrait2.png)
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
![](https://dfimg.dfrobot.com/63158dbfaa9508d63a425e17/enshopforum/9b352227591f4c411464b1d1e067c2a6.png)
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](https://dfimg.dfrobot.com/dfPortrait2.png)
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
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.