Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 5 months ago.
I can't measure several encoders (QEI doesn't wrok).
I want to read several encoders using QEI. I have succeeded to read one encoder, but the program doesn't work when I read two encoders. I use 303k8.
- include "mbed.h"
- include "QEI.h"
Serial pc(USBTX, USBRX);
QEI wheel1 (D8, A4, NC, 12, QEI::X4_ENCODING);
QEI wheel2 (A7, D12, NC, 12, QEI::X4_ENCODING);
int main() {
while(1){ wait(0.1); pc.printf("1 Pulses is: %i\n", wheel1.getPulses()); pc.printf("2 Pulses is: %i\n", wheel2.getPulses()); }
}
Hi~~ I have the same problem..., do you solve it?
posted by Weber Yang 22 Oct 2018