|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. |
|
#2
|
||||
|
||||
|
Re: Victor SP
Quote:
Getting stated with RobotBuilder: https://wpilib.screenstepslive.com/s...f-robotbuilder Video series explaining how it works: https://www.youtube.com/playlist?lis...wtlgnvhGObeKzp |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|