|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#28
|
||||
|
||||
|
Re: CANJaguar
the info posted on the wrobotics site is called a JavaDoc, and it's a standard form of documentation that can be generated from JAva code automatically (as long as it'a commented properly). The JAvadocs for WPILib is distributed with the plugin package that you installed.
You can access these files locally on your machine by clicking the first logo in the bar at the top of NetBeans (Assuming that's what you're using), it should be the first link on the page that loads. Check out some helpful guides on my teams site on: Getting started with Java: Lecture 1, Lecture 2 JavaDocs: Intro/Setup, Use CAN Jaguars You're going to want to focus on the CANJaguar class. Use is as simple as placing the following lines in the right places in your code. Code:
import edu.wpi.first.wpilibj.CANJaguar; CANJaguar leftMotor = new CanJaguar(12); //where 12 is the CAN ID assigned to the motor controller leftMotor.set(x.x); //where x.x is a value between -1.0 and 1.0 (or your joystick axis...) |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|