|
Re: Help for a beginner
Don't worry this is my first year doing java for my team and it worked out great. I can try to explain the API to you the best i can. It basically has everything that the wpi library has to help or tell you what features are there and how to use them. Like for jaguar. If you find the jaguar on there it says:
Constructor Summary
Jaguar(int channel)
Constructor that assumes the default digital module.
Jaguar(int slot, int channel)
Constructor that specifies the digital module.
So i dont need to specify a slot when im constructing this. So in my code it is
Jaguar jaguar1 = new "Jaguar(1)"; The quotations dont go in the code they are to show you what the API says to do to construct it.
void set(double speed)
Set the PWM value.
for this i can do if(joystick1.getRawButton(1)) {
jaguar1.set(0.64); //the jaguar values are -1 to 1 and 0 is no output
} else {
jagaur1.set(0.0);
}
I dont know if this helped you at all or not. Hopefully it did.
__________________
|