![]() |
Slowing Down Motor On Java
I am a new person to the world of java and i have stumbled on to a problem. When trying to program a prototype arm it goes to fast.::safety::
How can i reduce the speed without changing the arm itself? |
Re: Slowing Down Motor On Java
Quote:
|
Re: Slowing Down Motor On Java
the code looks for a magnitude value from the controller that ranges from -1 to 1. like jhersh said, divide by some number.
2 would give half speed, for the best results if 2 is too large move the number by increments of .5 |
Re: Slowing Down Motor On Java
Are you using a Jaguar? A Victor? or a Spike?
|
Re: Slowing Down Motor On Java
Currently i am using a victor to control the arm system.
|
Re: Slowing Down Motor On Java
So based on what you said I am assuming you are doing something along this line
Code:
Victor a_motor = new Victor(1);Code:
Victor a_motor = new Victor(1); |
Re: Slowing Down Motor On Java
okay yayyyy it worked so awesome.............
but now i have a situation which is causing me a headache.:confused: how can i control the motor, using the victor, going forward and reverse using different buttons on the joystick cause i need the arm to go up and down. Thanks so much for your help people i really appreciate it. :D |
Re: Slowing Down Motor On Java
Quote:
Set the value to a negative number for reverse direction e.g. set (0.5) for 50% forward and set(-0.5) for 50% reverse |
Re: Slowing Down Motor On Java
Thats easy
Replace # with the button numbers and motor with your victor Code:
if (joystick.getRawButton(#) == true)Gus Robotics, team228.org |
| All times are GMT -5. The time now is 22:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi