View Single Post
  #2   Spotlight this post!  
Unread 15-01-2014, 20:25
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Motor Question..

You control the motors through the motor controller, so there are three classes to choose from in wpilib. Choose the one for the motor controller you are going to wire up to.

Talon
Victor
Jaguar

Example Code:
Code:
Talon shooterWheel = new Talon(3); //talon on PWM channel 3 on digital sidecar

shooterWheel.set(1.0); //spin the motor at full voltage in one direction
shooterWheel.set(-1.0); //spin the motor at full voltage in the other direction
__________________
http://team2168.org

Last edited by otherguy : 15-01-2014 at 20:31. Reason: added links to javadoc and code sample
Reply With Quote