Go Down

Topic: CHP2.2 Engineering Kit- Rotary Encoder (Read 7257 times) previous topic - next topic


Have been unable to register a change in the >> readCount(enc) exercise in chapter 2.2 of the engineering kit tutorial . Only get the 12 response despite manually rotating the magnetic disc. Pretty certain wired up right and reading current change on the signal line but no change in the count.

Would appreciate any help to overcome this



Nov 27, 2018, 03:43 pm Last Edit: Nov 27, 2018, 03:50 pm by hawkinstom
I'm having a similar problem. Reading the encoder worked correctly when I first worked through chapter 2.2 (MATLAB) but at some point during chapter 2.3 (Simulink) it stopped. The motor can still be controlled with the start, stop and DutyCycle methods, but now I only get a constant 12 for the encoder's readCount and 65 for readSpeed in MATLAB no matter whether the motor is stopped, running or what.

I can see using a voltmeter that the encoder outputs are changing between 0V and 3.3V as I rotate the motor as expected, and I've tried uninstalling and reinstalling all the MATLAB/Simulink support packages without success. What next?


Dec 12, 2018, 04:06 pm Last Edit: Dec 12, 2018, 04:07 pm by hawkinstom
Having consulted Arduino technical support the solution appears to be to reflash the motor carrier board firmware using Arduino IDE > Files > Examples > MKR Motor Carrier> Flasher.

I'm not yet sure whether this is a permanent fix as I the first time I tried it the thing worked once then stopped working again, but after repeating the procedure it seems OK so far (crosses fingers)


That worked. Thanks very much for the help


I had the same problem and I'm flashing as suggested above. However, the flashing has been going for more than 30 minutes already, is this normal?
Thanks in advance!


Dec 03, 2019, 12:53 pm Last Edit: Dec 03, 2019, 01:01 pm by claudiafer54

I have the same problem my encoder counter always reads 12 and I'm flashing as suggested above. However, after the flashing, the problem is not solved.

What else I have to do?


Go Up