I'm trying to output a custom waveform from my Arduino Due but am having some issues. I'm trying to do something fairly simple but the Simple Waveform Generator (https://www.arduino.cc/en/Tutorial/DueSimpleWaveformGenerator) isn't very intuitive and seems to be missing some code (unless I'm really mistaken).
I only want to output a single waveform so I'm trying to avoid dealing with libraries and I don't need to adjust the frequency.
When I try and run the example code given in the tutorial linked above, it says that DAC0 wasn't declared in the scope. This even happens when I attempt to declare it.
Can someone give me some insight on how to actually use the DAC0 and DAC1 pins? Thanks!
Just use analogWrite...
If it's complaining that DAC0 isn't defined then double-check you have the correct board selected on the Tools menu.
Note the pinMode isn't strictly necessary as analogWrite checks that anyway.