encoder verwerkt
Dependencies: MODSERIAL QEI mbed
Fork of motor_control by
Revision 7:27625939c4ed, committed 2016-10-07
- Comitter:
- daniQQue
- Date:
- Fri Oct 07 08:18:44 2016 +0000
- Parent:
- 6:93a7d2989024
- Commit message:
- poging, met encoder naar revolutions door te delen door 3200;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 30 12:36:20 2016 +0000 +++ b/main.cpp Fri Oct 07 08:18:44 2016 +0000 @@ -30,15 +30,16 @@ motor1= CW; pwm_motor1=2.5; counts = Encoder.getPulses(); - pc.printf("encoder counts: %i \r\n", counts); - + pc.printf("encoder pulses: %i \r\n", counts); + float rondjes=counts/3200; + pc.printf("encoder rondjes: %i \r\n", rondjes); } else if (button_ccw==0) { ledccw=1; motor1= CCW; pwm_motor1=2.5; counts = Encoder.getPulses(); - pc.printf("encoder counts: %i \r\n", counts); + pc.printf("encoder counts: %i \r\n", counts); } else {