So far I have gotten my robot tuned to stand for long periods of time, but out of 8 potentiometers, one of them is read in a manner that bugs out.
While holding the arm in position, it holds a steady value of the following:
But randomly, there’s occasional spikes that lead to the value becoming extremely incorrect, just causing the robot to collapse while trying to hold itself up:
Even after replacing the potentiometer, this still occurs at the 3 wire port. Is there any possibility for this to happen? It doesn’t occur with any other 3 wire port.
I tried to smoothen out the potentiometer by using the motors, and using the potentiometer as a homing device every 100 miliseconds, where the motor’s position will creep over 1 degree towards the potentiometer’s value every 100 miliseconds. But even with that the robot continues to have occasional disruptions from the potentiometer’s incorrect value as seen in the time lapse, and almost falls over due to this random disruption although a minute one but can be catastrophic: