Quote:
|
Originally Posted by Jamie_Richard
This looks excellent, after sitting around looking out our programmers figure out nothing last night this is a breath of fresh air. I personally am not a programmer, but I am going to try to implement this tonight after the Suffield Scrimmage. We were using two sensors, and something didn't seem right about it, does anyone have any reccomendations, when using three sensor, on how to make the robot go backwards if its not seeing the line. I have a very limited knowledge of C, and I feel our programmers are uncomfortable with the platform this year. so...
If you guys can help me make this work, there will be Krispy Kreme's at Hartford (or Atlanta) for you, on me.
Thanks a Bunch!
Jamie
|
Catastrophy might have a more advanced solution, but basically, if you don't see the the line with any of your sensors, reverse. Something like this:
Code:
if(rc_dig_01 == 0 && rc_dig_02 == 0 && rc_dig_03 == 0)
{
pwm01 = 0;
pwm02 = 0;
}
You would, of course, have to add the code for actually following the line, but that is basically all you have to do to reverse if you don't see anything on the sensors.
PS the digital inputs are your sensors and the pwmXXs are the drive motors.
PPS Nine banners. Crazy.
