View Single Post
  #7   Spotlight this post!  
Unread 14-06-2007, 10:38
pafwl pafwl is offline
Franciose
AKA: Frank Larkin
FRC #0272 (Cyber Crusaders)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 1998
Location: Lansdale, Pennsylvania
Posts: 108
pafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud of
Re: Using IFI Controller witout Operator System

Step1: Connect OI to controller on robot. Forget about autonomous mode. After all the OI just sends the value of the joysticks to the controller, right. The code assigns it to the motors. If you don't assign it it will not run.

Step2: Use your sensors to determine what you want to do. Like if the sensors sees the light then assign a value to you PWM outluts where your motors are. No matter what mode you are in if you assign 255 to a PWM the motor will run.

I suggest you include a kill switch. Use a switch like a plug. If the plug is out the robot stops.

// include at bottom of code.
if( rc_dig_in01 == 1 )
{
// switch is open not closed, closed = 0 yes backards its digital
pwm01 = 127; // stops motor
pwm02 = 127; // stops motor
}


In addition I gave a workshop in 2005 on writing autonomous programs.
http://first.wpi.edu/Workshops/2005w...nferences.html

If you are still stuc that you need autonomous put this at the top of your program.

autonomous_mode = 1;

This will force on the autonomous bit. It is not necessary but put it on if you like.