Programming Logitech Extreme 3D Pro

Hey, I was wondering if I was able to program the small turning knob on the joystick (with + and - sign)? I want to use it as a throttle control for my shooting motor. My thought was, for example, that if I turned the knob to the halfway position my motor would be limited to that max speed even if I pushed fully on the joystick. If it is possible could someone help me with how i would go about this?

If you mean the throttle axis, then yes this is possible to use this in the robot. Your question is a bit confusing though. Did you want to throttle your shooting motor, or the robot drive. I am not sure why you would use the joystick x/y axes for the shooter.

In terms of solutions; you only have to multiple the throttle axis with the desired axis or numerics chosen by a button press. I believe the output of the throttle is between 0 and 1, and therefore directly applicable as a percentage of range. (decimal form)

Yeah, I’m using it to control the shooter, but for the Extreme 3D Pro joystick, axis 3 is the twist axis of the joystick, so I don’t know what I would use for knob.

Have you verified that axis? I have used the wireless version of that, and I thought that the throttle was on axis 3. If you have verified that your throttle is actually a different axis, the WPI library supports up to 6 axes. You simply have to use the axis that is suitable. (Maybe number 4?)

I’m pretty sure we have that same joystick. The throttle is axis 4, and it goes from -1 to 1. We added 1, divided by 2, then multiplied our other three axes by it (hint: multiplying a cluster of floats by a float works well)

we used one of those joysticks last year to drive our mechinum drive. The left right is 1, the forward back is 2, the rotation in the stick is 3, the throttle is 4.

Yeah we confirmed that axis 1 is the x-axis, axis 2 is the y-axis, axis 3 is the throttle which is the twisting of the joystick and axis 4 is the knob like switch at the bottom. My question is how would I program that axis to be used as a speed limiter? For example if I set that knob at a certain position, even if I press fully forward on the joystick, the motor won’t be able to go over a certain speed thus creating a speed limiter. If anyone can help me do this in LV it would be much appreciated.

Are you having trouble figuring out an equation (or algorithm) to use to perform the speed limit. Or do you already have an equation that you are having trouble translating to LabVIEW?

I’m having trouble with the equation and actual program of this limiter. I have no clue where to start.

There is a function in LabVIEW called “In Range and Coerce”. You can use the value of the throttle knob as the “maximum” input of the function, and use its negation as the “minimum” input if you want. The coerced output will follow the function’s input, but will be limited to always be no lower than the minimum and no higher than the maximum.

This will work, but well make a hard limit. The other solution post a few times makes a soft limit, applying the limit linearly across the whole a axis. There are reasons to use either. Your drivers may have an opinion on which way you pick.

Thanks for the help so far, I was thinking would we be able to wire a potentiometer to a bread board and use that instead of trying to use a joystick for this function? If possible how would I program it to interact with the motor?

I am not sure if you mean on the robot or driver station. If you meant the driver station, this wouldn’t be very easy, and a joystick would make much more sense.
If on the robot, then it is a bit easier, but I still don’t recommend it. It would add complexity to the robot wiring/programming, (depending upon how it would be used) weight, and not be adjustable during a match. Again, I suggest sticking to your original idea of a joystick axis. If you want something more difficult to modify while in use, you could always use a custom dashboard with a throttle slider on it.

The Cypress board will work for connecting a potentiometer to the Driver Station. In the simple “compatible” mode, you can read up to four analog inputs and use the returned value to govern your motor speed.

You don’t even have to use a physical potentiometer if you don’t want to. The Driver Station has an I/O tab that lets you set the value of a virtual analog input, which the robot can read as if it were a real analog value.

Thanks for mentioning this, I had completely forgotten about those.