Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MODSERIAL mbed Encoder
Diff: main.cpp
- Revision:
- 7:4d2edb5b0164
- Parent:
- 6:27a4e8d9ddac
- Child:
- 8:43cce9f7a006
--- a/main.cpp Fri Oct 18 09:32:49 2013 +0000 +++ b/main.cpp Fri Oct 18 10:05:56 2013 +0000 @@ -3,7 +3,8 @@ AnalogIn emgt(PTB1); AnalogIn emgb(PTB0); MODSERIAL pc(USBTX,USBRX); - +PwmOut pwm_motor1(PTA12); +PwmOut pwm_motor2(PTA5); volatile bool looptimerflag; void setlooptimerflag(void) @@ -109,6 +110,8 @@ if (z>1.0) { z=1.0; } - pc.printf("%f\n\r",z*5.0); + pwm_motor1=z; + pwm_motor2=z; + pc.printf("%f\n\r",z); } } \ No newline at end of file