Preseason Lesson6
From 1511Wookiee
Jump to navigationJump to search
Turbo and Slow speed
The goal is run the motor, with different max speed based on joystick buttons. This simulates drivign the robot in 3 different speed ranges.
At the end of Lesson 4 you had had the joystick controlling the speed of the motor, by mapping the joystick position directly to the motor speed. That is full speed, or what we call "Turbo" speed. Most of the time we do not run at that speed. There are other times we want to run at slower speed to have better control over the robot, what we call "Slow" speed.
The buttons that determine which of the 3 speed modes to run in are as follows:
- the Trigger means to run at normal speed
- Button 6 means to run at "Turbo" speed
- Button 7 means tp run at "Slow" speed
To keep this exersice simple, the speeds are defiend as follows:
- normal speed is running the motor at 1/2 the josystick value
- "Turbo" is mapping the joystick directly to the motor speed.
- "Slow" is running the motor at 1/4 the joystick value