Waveform output on Due


hello all,

i'm trying output custom waveform arduino due having issues. i'm trying simple simple waveform generator isn't intuitive , seems missing code (unless i'm mistaken).

i want output single waveform i'm trying avoid dealing libraries , don't need adjust frequency.

when try , run example code given in tutorial linked above, says dac0 wasn't declared in scope. happens when attempt declare it.

can give me insight on how use dac0 , dac1 pins? thanks!

just use analogwrite...
code: [select]
  pinmode(dac0, output);
  analogwriteresolution(12);
  analogwrite(dac0, a);[/a]
if it's complaining dac0 isn't defined double-check have correct board selected on tools menu.

note pinmode isn't strictly necessary analogwrite checks anyway.


Arduino Forum > Products > Arduino Due (Moderator: fabioc84) > Waveform output on Due


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'