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