Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Victor sample code */
- /* LEARN FROM DA MASTER */
- /* import the necessary stuff */
- import edu.wpi.first.wpilibj.Victor;
- public class Something {
- /* here, initialize the Victor controller variable - don't assign anything yet! */
- Victor vicmotor;
- public void robotInit() {
- /* here, actually assign the controller */
- vicmotor = new Victor(2); // or some other num
- /* etc. */
- }
- public void teleopPeriodic() {
- /* here, set a speed like Jaguar */
- vicmotor.set(1.0); // -1.0 < x < 1.0
- /* etc. */
- }
- }
- // tada
Advertisement
Add Comment
Please, Sign In to add comment