JEISSON CASTRO
/
pwmprueba
servomotor
Revision 0:36de5330e386, committed 2017-04-20
- Comitter:
- JDC128
- Date:
- Thu Apr 20 00:23:57 2017 +0000
- Commit message:
- servomotor
Changed in this revision
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
pwmprueba.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 36de5330e386 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Apr 20 00:23:57 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/856d2700e60b \ No newline at end of file
diff -r 000000000000 -r 36de5330e386 pwmprueba.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pwmprueba.cpp Thu Apr 20 00:23:57 2017 +0000 @@ -0,0 +1,32 @@ +#include "mbed.h" + +PwmOut mipwm(PA_0); // IO used by pwm_io function +PwmOut mipwm2(PA_1); + + + +int main(){ + + +mipwm.period_ms(20); + +while(1){ + mipwm.pulsewidth_us(2000); + wait(1); + + mipwm2.pulsewidth_us(2000); + wait(1); + + mipwm.pulsewidth_us(700); + wait(1); + + + mipwm2.pulsewidth_us(1400); + wait(1); + mipwm2.pulsewidth_us(700); + wait(1); + } + + + +} \ No newline at end of file