Create the program here -->
(Drivetrain ... Set speed)
Turn on the motor power switch.
It's on the XRP controller board, to the left of the battery connector and next to the Servo 1 connector.
After clicking "Run", carefully disconnect the USB cable from the XRP controller board
Carefully place your XRP on the floor and aim it where it has some room to move
Press the user button
How far did your XRP drive? (Find a meter stick/ruler in the classroom)
Did your XRP drive straight?
Review: Helpful Drivetrain Functions
Experiment with the "Straight" and "Turn" blocks
Note that the "Turn" block uses the XRP's IMU ("Inertial Measurement Unit") gyroscope to turn to the correct angle.
That's pretty cool! (We'll learn more about the IMU later.)
Write code to drive the XRP straight for 20 centimeters and then turn 90 degrees clockwise.
When you disconnect the USB cable and reconnect it, the XRP Code Editor may not connect to your XRP.
Try clicking the "Reset" button, on the left side of the board, above the battery jack. Then, click "Connect" in the XRP Code Editor.
Use the "Straight" and "Turn" blocks to drive a square.
Does your XRP return to the starting position at the completion of the square?
How fast can your XRP complete the square?
How does speed affect the navigation accuracy?
Be sure to turn OFF the motor power switch when you are done driving!
(And especially during classroom breaks and after the end of class.
Otherwise, the battery will drain and you won't be able to drive.. 😞