encoder verwerkt
Dependencies: MODSERIAL QEI mbed
Fork of motor_control by
Diff: main.cpp
- Revision:
- 5:bb97950558bd
- Parent:
- 4:d39f84608204
- Child:
- 6:93a7d2989024
--- a/main.cpp Fri Sep 30 11:56:15 2016 +0000 +++ b/main.cpp Fri Sep 30 12:01:06 2016 +0000 @@ -21,14 +21,14 @@ volatile int counts; while(true) { - if (button==1) + if (button==0) { //als knop is aan dan led=1; motor1= CCW; pwm_motor1=2.5; QEI Encoder(D12,D13,NC,64); counts = Encoder.getPulses(); - pc.printf("encoder counts %i", counts); + pc.printf("encoder counts %i/r/n", counts); } else{