Sense hat text examples

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]

Related posts

TLV493D magnetic sensor and Raspberry Pi 4 python example

SHT40 Digital Humidity Sensor and Raspberry Pi 4 python example

LTR390 UV Light Sensor a Raspberry Pi 4 in python

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