View Single Post
  #3   Spotlight this post!  
Unread 28-02-2012, 23:06
ProgrammerMatt ProgrammerMatt is offline
Programmer-Electrical-Mechanical
FRC #0228 (Gus)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Southington
Posts: 138
ProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really nice
Re: VEX Motor module programming

Quote:
Originally Posted by Ian McShane View Post
What do you want to do with it? Create it? tell it to move?

public static Victor Motor1; //defines "Motor1" as a Victor


private static final int PORT_ONE = 1; //defines "PORT_ONE" as an int number 1

Motor1 = new Victor(PORT_ONE); //defines Victor as put in port 1

Motor1.set(.5) //sets speed of motor/victor, argument can be between -1 to 1. 1 is full speed, -1 is full speed backwards.

Wouldn't this be easier..

Code:
Victor vexmotor = new Victor(#);

vexmotor.set(0.5);
Reply With Quote