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:
- 10:2e66843bb6d7
- Parent:
- 9:006f34c9f750
- Child:
- 11:28a196a3d898
--- a/main.cpp Mon Oct 21 11:48:58 2013 +0000 +++ b/main.cpp Mon Oct 21 13:52:39 2013 +0000 @@ -5,8 +5,9 @@ //Rechts is x, links is y AnalogIn emgtl(PTB1); AnalogIn emgbl(PTB0); -PwmOut pwm_x(PTA5); -PwmOut pwm_y(PTA12); +//PwmOut pwm_x(PTA5); +//PwmOut pwm_y(PTA12); +AnalogOut pwm_x(PTE30); MODSERIAL pc(USBTX,USBRX); volatile bool looptimerflag; @@ -51,10 +52,6 @@ while(1) { while(looptimerflag != true); - { - pwm_x.write(abs(zx)); - //pwm_y.write(abs(zy)); - } looptimerflag = false; ktr=emgtr.read(); @@ -115,8 +112,8 @@ zy=0; } - pwm_x.write(abs(zx)); + //pwm_x.write(abs(zx)); //pwm_y.write(abs(zy)); - pc.printf("%f\n\r",zx); + pc.printf("%f\n\r",kbr); } } \ No newline at end of file