Embedded system Fun Blog
























































Find out all the best information, libraries and circuit about the latest Embedded systems.
Showing posts with label sound sawtooth. Show all posts
Showing posts with label sound sawtooth. Show all posts

Saturday, 7 January 2012

MBED Example: http://mbed.org/projects/libraries/svn/mbed/trunk/AnalogOut.h

.from: http://mbed.org/projects/libraries/svn/mbed/trunk/AnalogOut.h

// Make a sawtooth output

#include "mbed.h"

AnalogOut tri(p18);

int main() {
 while(1) {
     tri = tri + 0.01;
     wait_us(1);
     if(tri == 1) {
         tri = 0;
     }
 }
}