Alternative Mars Rover Motion Control

Example Description
Learn how to code the Mars Rover to turn left and right on a circle with the set () to () block. Try different left and right orientations and move the Mars Rover with the up and down keys.


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.

  1. Turning left on a circle:
  2. 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.


Circular Right-Left Motion

Table of Contents