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

The "await" command in LEGO SPIKE Python Pro Preview

The await command tells your robot:
“Wait until this action is finished, then continue!”

content picture

Why use "await"?

  • Motors need time to move
  • Sounds need time to play
  • Sensors need time to read values

Without "await", the robot may move on too quickly and not finish its actions properly.

Important rule

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

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

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

Абонирай се

  • #2586
  • 10 Feb 2026