Teacher's Notes: How to conduct the lesson on moving around the Moon Pro Preview

Select an object to represent the Moon and place it in an open area. Students will program their robots to move around it.

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #2587
  • 10 Feb 2026

Mark the starting position (the base) using tape. The robots should be able to reach the side of the “Moon” with a single straight movement.

Do not allow students to spend more than 5 minutes on the task "Take up to 5 minutes to check if it's possible to program the robot to move forward for 2 seconds by rotating both motors at the same time using only the "run_time" command.". Students should realize that this is not possible because the program waits for one motor to finish before starting the other.

Solution to the task "Now that you know about the "await" command, try again to program the robot to move forward for 2 seconds using only "run_for_time()", but use await only on the second motor command.":

from motor import run_for_time
import runloop
import motor, time

async def main():
    # write your code here
    run_for_time(port.D, 2000, 1000)
    await run_for_time(port.F, 2000, 1000)

runloop.run(main())

The second run_for_time command must use "await".

Solution to the task "Now that you know how to use the API, program the robot to move forward for 2 seconds using the "motor_pair.move_for_time()" function".

from hub import port
import runloop
import motor_pair

async def main():
    # Pair motors on port A and B
    motor_pair.pair(motor_pair.PAIR_1, port.F, port.D)

    # Move straight at default velocity for 1 second
    await motor_pair.move_for_time(motor_pair.PAIR_1, 2000, 0)

runloop.run(main())