Go to Post Basically, just because you CAN do something doesn't mean you should and being savvy enough doesn't entitle you to being above the law. - Greg Needel [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-01-2017, 10:47
GuyWithAHoodie's Avatar
GuyWithAHoodie GuyWithAHoodie is offline
Registered User
AKA: Chris
FRC #4625 (Trappers)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2017
Location: Canada
Posts: 1
GuyWithAHoodie is an unknown quantity at this point
Victor SP

Hello, I'm new to programming and FRC in general, Trying to learn the coding aspect.

Does anyone have example Victor SP code or just tips in general?
Everything is helpful.

Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 11-01-2017, 12:19
AustinShalit's Avatar
AustinShalit AustinShalit is offline
Registered User
AKA: אוסטין
no team (WPILib Suite Developer)
 
Join Date: Dec 2013
Rookie Year: 2008
Location: Los Angeles/Worcester/Israel
Posts: 144
AustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of light
Re: Victor SP

Quote:
Originally Posted by GuyWithAHoodie View Post
Hello, I'm new to programming and FRC in general, Trying to learn the coding aspect.

Does anyone have example Victor SP code or just tips in general?
Everything is helpful.

Thanks.
I would take a look at RobotBuilder to get started. It will set up your java project for you and make the code clear.

Getting stated with RobotBuilder:
https://wpilib.screenstepslive.com/s...f-robotbuilder

Video series explaining how it works:
https://www.youtube.com/playlist?lis...wtlgnvhGObeKzp
__________________
Reply With Quote
  #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
Reply


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 12:33.

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