What I want is to have is like this picture but code it in python
What happens mathematically when you cube a number? What arithmetic operation(s) are involved?
How would you take the input value from the joystick and change it according to arithmetic operation(s) you identify above?
Other questions to ask yourself / experiment with:
- What are the range of values given by the Joystick axis in Vex Python?
- Does that range match the -1 to 1 range you specify above?
- If not, how can you manipulate the values to do so?
Take the input joystick, divide it by its maximum value. Cube that value, multiply by maximum motor input value and send to motor.
How do I
1: find the joystick input in percentage
2: find the maximum value
3: find the motor maximum value
The Vex Code documentation contains this information and can be found: VEX Help
Alternatively, it can be helpful in situations like this to print out values either to the Brain, the Controller, or the Terminal.
this is left as an exercise for the reader
So there is the code for joystic axis but how would i make that into a number?
You are on the right path. Keep going thru the documentation or whatever method led you to find the axis and you’ll find your answer.
I lloked through the documentation you linked but cant find it any hints to where its at?