ROBOTC.net forums
http://www.robotc.net/forums/

BEST Competition Programming Templates
http://www.robotc.net/forums/viewtopic.php?f=53&t=2674
Page 1 of 1

Author:  jbflot [ Wed Oct 20, 2010 4:24 pm ]
Post subject:  BEST Competition Programming Templates

Hey all BEST Teams!

We’ve made a new library and sample program to help BEST teams up and running with using ROBOTC with their Cortex systems. This new template makes it really easy to customize your program for your robot without having to worry about loops, conditionals and variables too much. Here’s an example of some of the new functions.

* ArcadeTwoWheelDrive(vexJSLeftV, vexJSLeftH, left, right);
o Use this function to create a “arcade” (1 joystick) drive program. Pass 4 pieces of data to have the function do all the work for driving your robot.
+ 1st: MoveChannel – The joystick channel for forward and reverse.
+ 2nd: RotateChannel – The channel on the rotate port that controls left and right rotation. This value is mixed with the move channel.
+ 3rd: leftMotor – The motor on the left side of the robot.
+ 4th: rightMotor – The motor on the right side of the robot.
* TankTwoWheelDrive(vexJSLeftV, vexJSRightV, left, right);
o Use this function to create a “tank” (2 joystick) drive program. Pass 4 pieces of data to have the function do all the work for driving your robot.
+ 1st: MoveChannel – The joystick channel for “left” motor.
+ 2nd: RotateChannel – The joystick channel for “right” motor.
+ 3rd: leftMotor – The motor on the left side of the robot.
+ 4th: rightMotor – The motor on the right side of the robot.
* MotorControlViaDigitalButtons(Btn7D, Btn7U, leftArm, -127, +127, 0);
o Use this function to control a motor via two digital buttons – Very customizable!
+ 1st: Btn7D – The joystick button that controls speed decrease
+ 2nd: Btn7U – The joystick button that controls speed increase
+ 3rd: leftArm – The motor that is being controlled
+ 4th: -127 – The lowest value for the motor speed
+ 5th: +127 – The highest value for the motor speed
+ 6th: 0 – How fast to adjust the speed. 0 — fastest. 50 — 1.25 seconds to cover the compete range.

Download this new library and sample program today. To help you get started, we’ve written a “getting started” PDF that will help you get started with this library.

BEST Code Library V1 http://www.robotc.net/blog/wp-content/uploads/2010/10/BestCodeLibraryV1.zip
BEST Code Library “Getting Started“ http://www.robotc.net/blog/wp-content/uploads/2010/10/BESTCodeLibraryGettingStarted.pdf

Author:  bshenold [ Fri Oct 19, 2012 10:14 pm ]
Post subject:  Re: BEST Competition Programming Templates

Thank you so much! This will help our team quite a bit! Again thank you! :)

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/