Award
Congratulations DJ Sures, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Joystick 2 Control Help

Assistance Requested

Help gwen4156 with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

gwen4156 claims to have checked these sources:
 
#1

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.

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

Can you be more specific on what you're asking? Smile

#3

What do the 'min' and 'max' values in the joystick control refer to? Any thoughts on how to set them to get the joystick to do what I describe doing above with buttons 2 and 4?

#4

Can you screenshot what options you are referring too?

There are normally blue question marks everywhere to hover your cursor over. Perhaps I'm missing one of those on something important in the joystick control that no one has noticed yet.

#5

I have buttons 2 and 4 currently configured as shown in the screencap and I would love to be able to have joystick 2 do the same job but not sure what the servo values mean or if that's possible without writing custom script.

Thanks
User-inserted image

User-inserted image

#6

User-inserted image

#7

These are servo values where min=1 and max=180. You can look at it as degrees of servo movement... This is used when the joystick is controlling regular servos....

#8

Hi. Don't want to highjack this thread, but I have a question relating to joystick 2. Is there a way of changing the servo speed so when joystick 2 is fully pressed in any direction, the servos they are controlling don't turn at maximum speed?

I know that joystick 2 has variable speed positions (the harder you press, the faster the servos spin) but I want to limit the maximum speed, like you would do with the buttons setup that change speeds using servospeed() script, as joystick 2 doesn't seem to have the scripting option (not that I have seen anyway).

Any help on this would be greatly appreciated, as always. Smile

Steve.

#9

@Steve G...If you are talking about 360 deg servos then you would control speed via the Modified Servo Movement Panel....

#10

@Richard.
Sorry, I should have said but forgot to mention it *sleep*. No, I meant 180 deg servos.