Lisa Meijer
/
servo_opendicht
servo
Revision 0:9ab9a207b766, committed 2016-11-02
- Comitter:
- lisa96m
- Date:
- Wed Nov 02 10:12:07 2016 +0000
- Commit message:
- opendicht servo;
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 9ab9a207b766 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Nov 02 10:12:07 2016 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" + +PwmOut servo(D9); + +void dicht() +{ + servo = 0.08; +} + +void open() +{ + servo = 0.04; +} + +int main() +{ + servo.period(0.020); + while(true) + { + open(); + wait(1); + dicht(); + wait(1); + } +} \ No newline at end of file
diff -r 000000000000 -r 9ab9a207b766 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Nov 02 10:12:07 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/25aea2a3f4e3 \ No newline at end of file