|Page 1 of 1|
|Author:||u50cent [ Fri Mar 11, 2016 6:04 pm ]|
|Post subject:||Blocked encoder|
I have written a function for a turn with acceleration at the start of the turn and decceleration at the end.
The code is:
Most of the time it is working great. But sometimes (more or less randomly) it gets stuck. It appeares as if something was wrong with the condition in while statement or the encoder is malfunctioning.
The master (even if I switch the roles of master and slave) encoder/wheel gets blocked, meaning the encoder value remains the same. The other motor keeps spinning. If I then manually turn the master wheel just a little bit, it goes on without the problem.
I have noticed that the error gets worse the longer the brick is unplugged, but still indicates full battery. Therefore I was wondering if that could be the cause of the problem or did I miss something else.
Thank you for all your suggestions and help in advance
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group