|
Re: Current Draw vs. Stall current
[quote=Jared341;1077997]There are a few ways to defeat defense...
Pushing (works great against most, but just as with speed, you will eventually encounter a bot that can push you to a standstill)
In 2009 (remember the slick surface?) our lead rogrammer added in code to increase the allowable pushing power of our bot. We weighed 85 lbs on the chart, and we were pushing around 120 lb bots with those ungainly trailers.
//Traction control calculations
if(m_rightStick->GetRawButton(1) == 0) {
if (ncount1 == 0 && ncount2 == 0) {
ncount1 = count1;
ncount2 = count2;
} else {
speed_error1 = ncount1 - count1;
speed_error2 = ncount2 - count2;
ncount1 = count1;
ncount2 = count2;
}
//ajjy = ajjy * .95;
if (speed_error1 > 30 && speed_error2 > 30 ) {
float ajjy = ajjy * .9;
float ajx = ajx * .9;
printf("Motor Y: %f", ajjy);
printf("Motor X: %f", ajx);
}
}
It worked, and it might help with mechano wheels, but I don't think this code will really be usefull for at least another 5 years...
Ready for kickoff?
__________________
Mentoring:
1) Educating students on the ability to learn and have fun at the same time.
2) Giving back to those who made you who you are.
2009-2011 Student 2405 Electrical/Programming & Asst. Captain
2012-???? Mentor 2405 Programming/Jack-of-all-Trades
|