|
I'm gonna butt in with my overcomplication philosphy -
Why is number 3 neccessary? Does slowing your robot down in code help while playing the game? I would think adjusting the motors themselves to coasting would be good enough to not stop abruptly. Or just letting the driver do it manually. It's not that hard to ease up on the joystick a little bit. Also the effort required to put it in programming requires a few things considered:
-There was some suggested code in a previous post. That code seems to slow down the turning too. So if you were turning then wanted your robot to slow down, it would keep turning while slowing down(while reducing the turn rate). I would assume that most would want to to keep its heading(or turn position) while slowing down in the current foward direction. That would require setting both motors to the same speed, and then slowing down.
-Two, there is an issue of knowing what you should be doing while slowing down. Subtracting from both motors is the simple answer. What if the robot was going backwards? You would be adding. How do you know to slow down? When p1_y is set to 127 is the simple answer. But what if you want to turn the robot while being still? p1_y is still 127 but your robot should be moving not slowing down.
To address number 2:
Why do you need special code for this? The default code can do that pretty well. rblayer address that himself, He was referring to the default code - I think.
About number 1:
I have no clue what you mean, or what you need to accomplish. Please clarify. It seems you want the wheel to set a "sensitivity" value for the joystick. Or else you want to have a wheel be able to "cruise control" your robot. There are two other wheels for the x and y axis that do this for you already.
__________________
Ogun's Laughter is No Joke!!!
|