test
Dependents: measuring_wheel Nucleo_NHK_2018_syudo_wheel wheel_test3 wheel_test4 ... more
Fork of QEI by
Diff: QEI.cpp
- Revision:
- 1:40523b009a03
- Parent:
- 0:5c2ad81551aa
- Child:
- 2:fe23b32e62ca
--- a/QEI.cpp Thu Sep 02 16:48:55 2010 +0000 +++ b/QEI.cpp Mon Jul 02 08:35:17 2018 +0000 @@ -133,7 +133,11 @@ PinName index, int pulsesPerRev, Encoding encoding) : channelA_(channelA), channelB_(channelB), + led(LED2), index_(index) { + + channelA_.mode(PullUp); + channelB_.mode(PullUp); pulses_ = 0; revolutions_ = 0; @@ -236,7 +240,7 @@ // predict - if this is the case, it is generally safe to ignore it, update // the state and carry on, with the error correcting itself shortly after. void QEI::encode(void) { - +// led = !led; int change = 0; int chanA = channelA_.read(); int chanB = channelB_.read();