Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Public Domain
- // More information: http://www.cmiyc.com/blog/2013/02/07/sawtooth-waveform-with-the-arduino-dues-built-in-dac/
- void setup() {
- // None, analogWrite() sets up pin state
- }
- void loop() {
- // Simple sawtooth waveform
- for(int x=0; x<255; x++) {
- analogWrite(DAC0, x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment