








| |
WPI Framework and Sample Code
Framework Version 1.3 (11/23/2004)
Framework
Documentation (11/29/2004)
-
Version 1.2 of the framework has undergone significant revision
to allow for the use of the field control system. This will require you to
make changes to your main.c file.
The main.c included in the sample code is divided into two
separate functions, autonomousMode and
main. The code in autonomousMode will run when the robot is first
enabled unless you put a jumper on input pin 13. If you wish to drive the
robot with the radio, you must put a jumper on pin 13 to disable autonomous
mode.
If you are using servos, you must specify
which ports they are on using the SetPortAsServo(port)
function. The sample code specifies servos on ports 5 and 6. To
control servos, you must use the Servo(port,
value) function. This function will
tell a servo on PWM OUT port port
to move to position value
(which is a number between 0 and 255).
Below is a sample main.c which shows how
you would enable a dead band and scale the joystick inputs to match the speed
range of the motor.
-
Version 1.3 adds the
AutonomousWait() function, which works just like
Wait(), but will
only wait while the robot is in autonomous mode. Version 1.3 also has
minor bug fixes. You can use main.c files from version 1.2 with
version 1.3.
Sample
Main.c with dead bands, limit switches, servos, and scaling (12/02/2004)
Old Versions
Framework Version 1.2
Framework_default_v1.0s
Other Software (mirrored for
Worcester Public Schools)
IFI Loader 1.0.7
Freebyte Zip
|