team116 / ed2017

1 stars 0 forks source link

Add rotate in place button to driver joysticks #26

Closed cartycrabber closed 7 years ago

cartycrabber commented 7 years ago

We want a button that you can hold to control the rotation of the robot with the rotation of the joystick. Similar to the drive straight button, while you hold it the robot will rotate according to that one joystick, and when you let go the robot will go back to normal. Remember the rotation axis is measured from -1.0 to 1.0, so you can take the current rotation value and apply that to the motors (one being positive and one being negative)

EXAMPLE; rotating joystick 0.6 set left motors to 0.6 set right motors to -0.6 thus robot spins in place at 60% speed i might have the positive and negative backwards idk figure it out