Embedded system Fun Blog
























































Find out all the best information, libraries and circuit about the latest Embedded systems.

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;
     }
 }
}

No comments:

Post a Comment