Yanni Coroneos
/
pump_controller
a simplistic controller to run a pump
main.cpp
- Committer:
- sandwich
- Date:
- 2013-12-14
- Revision:
- 0:4f21cc600d24
File content as of revision 0:4f21cc600d24:
#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; }