
servo motor
Revision 0:2933e08620c9, committed 2017-04-19
- Comitter:
- JDC128
- Date:
- Wed Apr 19 23:25:25 2017 +0000
- Commit message:
- pmw
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 Wed Apr 19 23:25:25 2017 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" + +DigitalOut my_led(LED1); +DigitalOut my_pwm(P_A0); // IO used by pwm_io function + +int main(){ + +my_pwm.periodo_ms(20); + +while(1){ + my_pwm.pulsewidth_ms(1); + wait(2); + my_pwm.pulsewidth_us(1500); + wait(2); + my_pwm.pulsewidth_ms(2); + wait(2); + } + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Apr 19 23:25:25 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/856d2700e60b \ No newline at end of file