В момента ресурсът е наличен само на английски

The "await" command in LEGO SPIKE Python Pro Preview

The await command tells your robot:
“Wait until this job is finished, then keep going!”

content picture

Необходимо е да се абонирате за FLLCasts.com, за да достъпите това видео

Абонирай се

  • #2586
  • 10 Feb 2026

Why Use await?

  • Motors take time to move
  • Sounds take time to play
  • Sensors take time to check

Without "await", the robot might rush ahead and get confused!

Important Rule

You can only use "await" inside an "async" function.

async def main():
    await motor.run_for_time(port.A, 1000, 1000)