Introduction
In the last project, we looked at the Mars Rover control for turning left and right.
Instead of rotating the Mars Rover at a place to turn left or right, you can alternatives make the Mars Rover move in a circle.
- Turning left on a circle:
- Turning right on a circle:
This can be executed with the set () to () block. You have 2 other options Left and Right.
Left Orientation
Right Orientation
Coding Steps
The following code sets the servo motor position to the left, straight, and right when the a, s, and d keys are pressed. Then to move the Mars Rover, the code checks if the up and down key is pressed.
Make the code and play with the Mars Rover.
Output
Circular Right-Left Motion