Chris Styles
/
app-board-AnalogOut
An example program driving the AnalogOut. Connect a pair of earphones!
Revision 0:1a38bf78f122, committed 2012-10-16
- Comitter:
- chris
- Date:
- Tue Oct 16 13:40:24 2012 +0000
- Child:
- 1:754db1ff50f2
- Commit message:
- First 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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 16 13:40:24 2012 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" + +AnalogOut Aout(p18); +AnalogIn pot1(p20); + +int main() +{ + while(1) { + for(float i=0.0; i<1.0; i+=0.1) { + Aout = i; + wait(0.00001+(0.0001*pot1.read())); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 16 13:40:24 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc \ No newline at end of file