Home ยป Sense hat text examples

Sense hat text examples

by shedboy71

These were just some text examples for the Sense hat

[codesyntax lang=”python”]

from sense_hat import SenseHat
from time import sleep

sense = SenseHat()
green = [0, 255, 0]
sense.show_message("Hello!", text_colour=green)

[/codesyntax]

[codesyntax lang=”python”]

from sense_hat import SenseHat

sense = SenseHat()

yellow = (255, 255, 0)
blue = (0, 0, 255)

message = "Hello"

speed = 0.05

sense.show_message(message, speed, text_colour=yellow, back_colour=blue)

[/codesyntax]

[codesyntax lang=”python”]

from sense_hat import SenseHat

sense = SenseHat()

yellow = (255, 255, 0)
blue = (0, 0, 255)

sense.show_message("Hello!", text_colour=green)

speed = 0.05

while True:
    sense.show_message(message, speed, text_colour=yellow, back_colour=blue)

[/codesyntax]

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More