A simple program that sends a value over analog output.

Dependencies:   mbed

main.cpp

Committer:
tbjazic
Date:
2014-12-18
Revision:
0:768f66ec3284

File content as of revision 0:768f66ec3284:

#include "mbed.h"

AnalogOut out(p18);
Serial pc(USBTX, USBRX);

int main() {
    float value;
    while(1) {
        pc.printf("\n\rEnter value to send over analog out: ");
        pc.scanf("%f", &value);
        out = value;
        wait(10);
    }
}