A simple sawtooth waveform generator using analog output.

Dependencies:   mbed

main.cpp

Committer:
tbjazic
Date:
2014-12-17
Revision:
0:95fd5a7168ac
Child:
1:8901d4a806a8

File content as of revision 0:95fd5a7168ac:

#include "mbed.h"

AnalogOut out(p18);

int main() {
    while(1) {
        for (int i = 0; i < 10; i++) {
            out = i / 10;
            wait_ms(1);
        }
    }
}