Необходимо е да се абонирате за FLLCasts.com, за да достъпите това видео
- #2594
- 27 Feb 2026
"Program the robot to move forward for 2 seconds without using commands other than move_for_time()."
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())
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 of the lesson. The students are expected to clean the field in any way they can. A few tips for helping those who struggle:
Give them a tip that there is no set position behind the starting line that they are required to use. If they place their robot in line with the "rocks", they can clear the first 2 rocks with a single straight movement.
Allow the students to make changes to the robot, such as adding a wall in front of the robot so the "rocks" don't displace the robot on collision, and then suggest using this opportunity to turn the motors in the same direction.
Control expectations. If there is little time left, use the time they're constructing the "rocks" to lower the goal. A simple warning like "We are low on time, but let's try and get 3 rocks removed before the end of the lesson" will suffice. Make sure this does not come off as a criticism, as it may hurt the student's motivation.