Okay, so I'm new to programming for the robot (this is the first year that I've made a significant contribution), and I came up with a weird idea. What if an automatic "slow-down" was implemented into the robot during turns so that if the driver is less than capable (not saying ours is, just in general) of understanding that the robot needs to slow down for a turn, the robot would automatically slow down?
I outlined my thoughts in the following part of the code (which I put under void Teleop(void) ):
Quote:
if(p1_x >= 0 && p1_x <= 56)
{
pwm13 - 20;
pwm15 - 40;
}
else if(p1_x >= 57 && p1_x <= 124)
{
pwm13 - 10;
pwm15 - 20;
}
else if(p1_x >= 125 && p1_y <= 129)
{
}
else if(p1_x >= 130 && p1_x <= 198)
{
pwm13 - 20;
pwm15 - 10;
}
else if(p1_x >= 199 && p1_x <= 255)
{
pwm13 - 40;
pwm15 - 20;
}
|
I don't know where to go from here. Maybe change it so that it only slows down while accelerating beyond a certain point?
(Feel free to use this if you want, by the way.)