
Im trying to get joystick 2 on the game controller to control rotation of the torso on my B9. I currently am controlling rotation by pressing button 4 for counterclockwise and button 2 for clockwise ( I have the commands PWM(D1, 4) for button 4 down and PWM(D1, 0) for button 4 up and PWM(D1, 11) for button 2 down and PWM(D1, 0 ) for button 2 up)
I have the diverse electronics controller connected with only one signal wire and I'm not really sure what mode it needs or is working in as I cannot find any documentation on it.
Experimenting with only the' X axis' Joystick 2 settings, when I assign it o digital port D1, I can get the torso to turn in either direction by changing the values in the 'min' and 'max' box but have no idea why or what its doing.
Anyone have any ideas on what may be happening and how I might set the 'min' and 'max' values to get the joystick to change the direction of rotation?
Would I need to use both the 'x axis' and 'y axis' maybe? I have no idea.
Im just trying to free up buttons so I can assign more MP3 options for this afternoon to interact with the tick or treaters.
@Richard. Sorry, I should have said but forgot to mention it sleep. No, I meant 180 deg servos.
Try setting servo speed first in a script...
@Richard.
Thanks for that. I'll give it a try tomorrow morning. One question, may be a silly one, where abouts do I enter the servo speed script you supplied above, as I cannot see how or where to enter script in the joystick 2 setup screen when I click the gear icon?
@Steve G... Make a script called init... Make a point to run it at start up of your program... Or, what I do is use the script behind the connection control so it runs automatically when the ezb connects to ARC..
In this script you can set servo position, speed and set variables to default values as well.... etc
For the joystick script... Look at post# 5, second picture... This is where you would enter your button press script or scripts...
Thanks @Richard. But the picture in post #5 is not relivent to what I'm asking as this is for scripting buttons, and not scripting joystick 2 (unless I'm misunderstanding something).
@Steve G... see your other post
Sorry, I think I might be confusing the issue with the 2 posts. confused. To recap, Hear I want to set a max speed on servos controlled by joystick 2.
There is nothing on this page to enter scrips that I can see, only adjust "x" and "y" values.
The other post is regarding joystick buttons, not joystick 2.
Yeah, ok.... you can't adjust speed there in the joystick control... You need to do that in a generic script that you run once (if you don't want to change the speed after that again)...