Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   VEX Motor module programming (http://www.chiefdelphi.com/forums/showthread.php?t=103396)

SheMesH 20-02-2012 13:29

VEX Motor module programming
 
Hello,
how can I program the VEX Motor module?
Thank you for help, Team 2231.

Ian McShane 28-02-2012 19:06

Re: VEX Motor module programming
 
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.

PAR_WIG1350 28-02-2012 22:56

Re: VEX Motor module programming
 
Quote:

Originally Posted by SheMesH (Post 1130964)
Hello,
how can I program the VEX Motor module?
Thank you for help, Team 2231.

There are 3 vex items you could be referring to, a spike, a victor, and a 2-wire gearmotor. Which one do you want to know about?

ProgrammerMatt 28-02-2012 23:06

Re: VEX Motor module programming
 
Quote:

Originally Posted by Ian McShane (Post 1136357)
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);


SheMesH 04-03-2012 08:09

Re: VEX Motor module programming
 
Quote:

Originally Posted by ProgrammerMatt (Post 1136553)
Wouldn't this be easier..

Code:

Victor vexmotor = new Victor(#);

vexmotor.set(0.5);


thnx you!

ProgrammerMatt 04-03-2012 11:58

Re: VEX Motor module programming
 
Quote:

Originally Posted by SheMesH (Post 1138531)
thnx you!

Your welxcome


All times are GMT -5. The time now is 09:48.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi