Go to Post It's kind of magical how I went from legos to replacing most of the iron in my blood with aluminum, and all thanks to my elementary school science teacher. - Astrokid248 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 11-01-2017, 17:12
cttxzombieslaya cttxzombieslaya is offline
Registered User
AKA: Dillon Smithson
FRC #5864 (Robo Pelicans)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2015
Location: Port Allen
Posts: 2
cttxzombieslaya is an unknown quantity at this point
Re: Victor SP

I understand how difficult it can be especially when you're new to all of this, and I was last year.
But its pretty simple.

To first use anything in the VictorSP library you have to import the files into your program, which if your using the default programs that FRC provides (Sample, Iterative and Command) they have import commands lined up at the top of the program, so you can just put this up there to:

import edu.wpi.first.wpilibj.VictorSP;

Now you can use all of the VictorSP stuff now that you've put the library in.

to declare a Motor on your robot simply do this:

VictorSP leftMotor = new VictorSP(0);

The part where I put "leftMotor" can be changed of course, you can name it whatever you want. the last part "(0)" is the PWM port the motor is plugged into so make sure you have this right.

From here you can take them and start using your motors to program you driving functions.

If you have any questions you can message me cause i tend to leave so information out, but Im always here to help.
Hope you have a really awesome competition season!

~Dillon Smithson
Team 5864
Programmer
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:43.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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