David Buck
/
calibrate_esc
Revision 0:9f66525c89d7, committed 2010-01-27
- Comitter:
- Kaikestu
- Date:
- Wed Jan 27 11:55:24 2010 +0000
- Commit message:
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 9f66525c89d7 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jan 27 11:55:24 2010 +0000 @@ -0,0 +1,39 @@ +#include "mbed.h" +#include "Servo.h" + +DigitalOut myled(LED2); +Servo motor (p21); + +int main() { + +int b = 0; + +while (b !=2 ){ + + motor.write(0.5); + wait(3); + + motor.write(0); //full forward + wait(1); + motor.write(0.5); + wait(1); + myled = 1; + + wait(2); + + motor.write(0.88); //full bacward + wait(5); + motor.write(0.5); + wait(1); + myled = 0; + + b = 2; +} + + while(1) {//FIN + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +}
diff -r 000000000000 -r 9f66525c89d7 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 27 11:55:24 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0