I tried to choose a speed for my motor. The motor moves when I press specific keys on the controller as shown in my code. But sometimes when I run the program on the brain and try to move the motor with the button on the controller, it moves very slowly for a little and suddenly becomes faster, or it moves fast then becomes slow. Also sometimes it moves slowly the whole time the program is running but when I turn it off and on many times it changes its speed.
I am asking what could the problem be, is it the code or what exactly?