Hi, I've been trying to get a "GY MCP4728" break out board to work.
https://www.aliexpress.com/i/32975204887.html
I've not been able to find any info on the particular board but with a little guesswork...
I'm connecting it to a 5v ATMega 328P Arduino Mini Pro.
I've connected CL to SCL, DA to SDA, R to GND and I've left L hanging.
I've installed this library:
and tried to compile the example sketch.
First problem. At "Wire.begin(21, 22);" I get the following error:
Arduino: 1.8.7 (Mac OS X), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"
/var/folders/cd/qk843k6s1zg29k1shf789pfh0000gn/T/arduino_modified_sketch_754247/example.ino: In function 'void setup()':
example:10:22: error: no matching function for call to 'TwoWire::begin(int, int)'
Wire.begin(21, 22);
^
In file included from /var/folders/cd/qk843k6s1zg29k1shf789pfh0000gn/T/arduino_modified_sketch_754247/example.ino:1:0:
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:52:10: note: candidate: void TwoWire::begin()
void begin();
^
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:52:10: note: candidate expects 0 arguments, 2 provided
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:53:10: note: candidate: void TwoWire::begin(uint8_t)
void begin(uint8_t);
^
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:53:10: note: candidate expects 1 argument, 2 provided
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:54:10: note: candidate: void TwoWire::begin(int)
void begin(int);
^
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.h:54:10: note: candidate expects 1 argument, 2 provided
exit status 1
no matching function for call to 'TwoWire::begin(int, int)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
So to be honest i don't understand any of that but i took a look at the sketch in the examples folder on the github page and noticed that line of code was different. It reads "Wire.begin();" instead of "Wire.begin(21, 22));".
That version of the code compiles, loads and runs on my arduino but it appears to lock up at " dac.attatch(Wire, 14);".
It does run if a unplug the dac but that's no use ![]()
Can anyone spot any errors or make any suggestions to help me get this module running? Thanks.