View unanswered posts | View active topics It is currently Wed Apr 23, 2014 10:47 am






Reply to topic  [ 2 posts ] 
BEST Competition Programming Templates 
Author Message
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post 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

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Wed Oct 20, 2010 4:24 pm
Profile
Rookie

Joined: Wed Mar 02, 2011 9:57 am
Posts: 2
Post Re: BEST Competition Programming Templates
Thank you so much! This will help our team quite a bit! Again thank you! :)

_________________
Will Shenold,
Proud co-founder of Team Phoenix Robotics OKC!


Fri Oct 19, 2012 10:14 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.