Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Single Motor Programing Question (http://www.chiefdelphi.com/forums/showthread.php?t=83495)

Team 1554 23-02-2010 20:03

Single Motor Programing Question
 
Since we already used 4 of the CIM motors for the drive, we are only allowed to use 1 for the kicker.
I searched the java libraries but the only thing i can see to control a motor thats not a servo motor is only the RobotDrive, but that doesnt have a constructor for only 1 motor
How can i program a single motor?

DonRotolo 23-02-2010 22:00

Re: Single Motor Programing Question
 
Pretend it is a drive motor for the left side, and let it talk to only one PWM output.

MattD 23-02-2010 22:13

Re: Single Motor Programing Question
 
Take a look at the Jaguar or Victor class. These are used to control a single motor. In fact, RobotDrive by default creates two or four instances of Jaguar.

For example:

Code:

Jaguar motor = new Jaguar(5);  // Motor connected to Jaguar on PWM #5
Joystick stick = new Joystick(2);

// operator control:
motor.set(stick.getY()); // set the motor output to Y-axis input on Joystick #2



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

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