![]() |
Netbeans programming ONE motor on axis of Logitech Attack 3
Hi All!
Our team only knows how to program the axis on the Logitech Attack 3 if we are working with 2 motors. How would we change the program if we were to only program one motor? Thanks in advance! Green MASHine 4460 |
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Motor.setSpeed(joystick.GetRawAxis(1));
Where 1 can be replaced with your joystick axis, joystick can be replaced with your joystick name, and motor with the name of your PWM output. |
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Quote:
|
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Quote:
Pulley.setSpeed(operator.getRawAxis(2)); It is coming up as a wrong command saying: setSpeed(double) is not public in PWM; cannot be accessed from outside package How do I fix this? Thanks |
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Whoops, my bad. It's "set" instead of "setSpeed." Try it like that.
EDIT: also, make sure that your pulley is designated as a jaguar, victor, or talon. |
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Quote:
Why would the axis numbers vary? I know because of the x and y axis but would the number for the y axis vary? Thank you |
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Quote:
|
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Quote:
|
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Ah, ok. Every joystick axis has a number attached attached to it. The joystick.Get command basically checks a database for which axis number matches x, y, z, or the other axis names. I prefer to use getRawAxis because I know exactly the axis number I am calling for. It's really a matter of preference. If you prefer, you can use joystick.getAxis(y) to return the same value.
|
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Quote:
|
Re: Netbeans programming ONE motor on axis of Logitech Attack 3
Quote:
|
| All times are GMT -5. The time now is 07:25. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi