encoder verwerkt
Dependencies: MODSERIAL QEI mbed
Fork of motor_control by
Diff: main.cpp
- Revision:
- 7:27625939c4ed
- Parent:
- 6:93a7d2989024
--- 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 {