hello,
ok, so say I have a robot controlled by two joysticks. I want to make it so I can simply press a button on either of the joysticks to increase the pwm value by 4 every time the button is pressed. (the robot has two motors for each side of the tank-style robot). this seems like a good idea, but it means I have to limit the maximum value for the y-axis on each controller to something like 138. this way I can add 4 to its power each time the button on the appropriate joy stick is pressed, without going over 254. is there a simple way to limit the joy sticks top output value to 138?
ps-I am aware that shaft encoders are the new fad, and are far more accurate, but this would simply be a way to help me learn the code better and it is a temporary fix to the problem untill I have some good time to understand how to program the shaft encoders.
thanks for your patience,
Stephen
