A simple program that sends a value over analog output.
Dependencies: mbed
Revision 0:768f66ec3284, committed 2014-12-18
- Comitter:
- tbjazic
- Date:
- Thu Dec 18 09:24:09 2014 +0000
- Commit message:
- Initial commit.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 768f66ec3284 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Dec 18 09:24:09 2014 +0000 @@ -0,0 +1,14 @@ +#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); + } +} \ No newline at end of file
diff -r 000000000000 -r 768f66ec3284 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Dec 18 09:24:09 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file