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

How to display text on the SPIKE Prime Hub screen with Python Pro Preview

In this tutorial, you will learn how to make your LEGO SPIKE Hub display words or messages on its light matrix. Displaying messages can make your robot programs more interactive and easier to understand. For example:

  • A robot could display "GO" when it starts moving.

  • It could display "STOP" when it finishes.

  • It could show a player’s score in a game.

  • It could greet people with "HELLO" when it turns on.

By the end of this tutorial, you will know how to use a simple Python command to make your robot communicate by displaying text.

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

Абонирай се

  • #2614
  • 11 May 2026

First, make sure you import the light matrix so that Python knows you want to control it. At the top of your program, write:

from hub import light_matrix

Now you are ready to display a message.

The command you will use is:

light_matrix.write("message")

Replace "message" with any text you want to display.

Example:

from hub import light_matrix
import runloop

async def main():
    #Greet the user
    light_matrix.write("HELLO")

runloop.run(main())