Quote:
Originally Posted by fffxc2
Hello, this is my first year doing the programming on my team and we are having a very confusing problem. We are using an unmodified version of Kevin’s 2008 beta code with mplab v8 and c18 v3.1 and the code compiles fine and loads onto the robot fine, and it seems run on the robot, but the robot doesn't react at all. Its equally frustrating because when we load a copy of the 2007 code it works fine. It seems that no one else has had this problem (that I saw), though it seemed that Kevin referenced it in one of his posts.
Any help we could get would be much appreciated.
|
Because I don't know how you have your robot configured, you need to write this code yourself. Just open up teleop.c and scroll down to the teleop() function. Once there, you can map joystick inputs to motor outputs like this:
Code:
// map y-axis of the joystick on operator interface port #1 to the
// motor controlled by the Victor 883 attached to PWM output #1
pwm01 = p1_y;
// map y-axis of the joystick on operator interface port #2 to the
// motor controlled by the Victor 883 attached to PWM output #2
pwm02 = p2_y;
You can also use IFI's default robot code by uncommenting (remove the double slashes) in front of the call to Default_Routine() at the bottom of Teleop(). The code for Default_Routine() is located in ifi_code.c.
-Kevin