I need to utilize both DACs on my Arduino Due to output specified voltages. For some reason, I cant compile this simple code and keep receiving an error that the dac is not declared in the scope. I've copied and pasted other scripts including dac lines from the forum and they dont compile either which makes me think there is an issue with the board or my settings. When I go to tools and click board I see that the due is selected. Any ideas?
int v1 = 1.8;
int base = 1.65;
void setup() {
// initialize serial communication at 9600 bits per second:
//Serial.begin(9600);
//pinMode(DAC0, OUTPUT);
//pinMode(DAC1, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
analogWrite(DAC0, v1);
delay(500);
analogWrite(DAC0, base);
}