Yanni Coroneos
/
pump_controller
a simplistic controller to run a pump
Revision 0:4f21cc600d24, committed 2013-12-14
- Comitter:
- sandwich
- Date:
- Sat Dec 14 23:54:59 2013 +0000
- 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 Sat Dec 14 23:54:59 2013 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" + +DigitalOut outA(p21), outB(p22); +PwmOut pwm(p23); + +int main(void) +{ + outA=0; + outB=1; + float out=0; + while (1) { + pwm.write(out); + out+=0.1f; + if (out>=1.0f) { + out=0; + } + wait(0.5); + } + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Dec 14 23:54:59 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a842253909c9 \ No newline at end of file