Teacher's Notes Pro Preview

Solutions to today's tasks:

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #2594
  • 27 Feb 2026

Program the robot to move forward for 2 seconds using only the move_for_time() command.

from hub import port
import runloop
import motor_pair

async def main():
    # Pair motors on ports E and B
    motor_pair.pair(motor_pair.PAIR_1, port.E, port.B)

    # Move using the variables
    await motor_pair.move_for_time(motor_pair.PAIR_1, 2000, 100)

runloop.run(main())

Program the robot to turn for 2 seconds by changing the steering input.

from hub import port
import runloop
import motor_pair

async def main():
    # Pair motors on ports E and B
    motor_pair.pair(motor_pair.PAIR_1, port.E, port.B)

    # Move using the variables
    await motor_pair.move_for_time(motor_pair.PAIR_1, 2000, 0)

runloop.run(main())

Program the robot to move backward by changing only the speed in the move_for_time() command to a negative value.

from hub import port
import runloop
import motor_pair

async def main():
    # Pair motors on ports E and B
    motor_pair.pair(motor_pair.PAIR_1, port.E, port.B)

    # Move using the variables
    await motor_pair.move_for_time(motor_pair.PAIR_1, 2000, 100, velocity=-1000)

runloop.run(main())

Create a variable for the speed of the motors and name it "motor_speed".

from hub import port
import runloop
import motor_pair

motor_speed = 1000;

async def main():
    # Pair motors on ports E and B
    motor_pair.pair(motor_pair.PAIR_1, port.E, port.B)

    # Move using the variables
    await motor_pair.move_for_time(motor_pair.PAIR_1, 2000, 100, velocity=motor_speed)

runloop.run(main())

There are no wrong solutions for the final tasks in this lesson. Students are encouraged to clear the field in any way they can. Here are a few tips to support those who may struggle:

  1. Remind students that there is no fixed starting position behind the line. If they place their robot in line with the "rocks," they may be able to clear the first two with a single straight movement.

  2. Allow students to modify their robots. For example, they can add a front wall to prevent the "rocks" from pushing the robot away during collisions. You can also suggest using this setup to try turning both motors in the same direction.

  3. Manage expectations. If time is limited, use the time spent building the "rocks" to adjust the goal. A simple reminder like, "We are running short on time, so let’s try to remove three rocks before the end of the lesson," is enough. Be careful not to sound critical, as this may affect students’ motivation.