domingo, 19 de abril de 2020

INVESTING TODAY TO BUILD TOMORROW



CONCURSO DE ESERO

Desde casa al espacio, misión ASTROPI (esero)
from sense_hat import SenseHat
sense = SenseHat()
sense.set_rotation(270)
r = (255,0,0)
g = (0,255,0)
b = (0,0,255)
w = (255,255,255)
bk = (0,0,0)
sense.show_message("#QuedateEnCasa")
temperatura = round( sense.temperature, 1 )
sense.show_message("T="  + str(temperatura) + "C", text_colour=r)
humedad = round( sense.humidity, 1 )
sense.show_message("H="  + str(humedad) + "%", text_colour=b)
presion = round( sense.pressure*760/1013, 1 )
sense.show_message("P "  + str(presion) + "mmHg", text_colour=g)

p1 = [
    bk, bk, bk, bk, bk, bk, bk, bk,
    bk, bk, bk, bk, bk, bk, bk, bk,
    bk, g, g, bk, bk, g, g, bk,
    bk, g, g, bk, bk, g, g, bk,
    bk, bk, bk, g, g, bk, bk, bk,
    bk, bk, g, g, g, g, bk, bk,
    bk, bk, g, g, g, g, bk, bk,
    bk, bk, g, bk, bk, g, bk, bk
]
sense.set_pixels(p1)

No hay comentarios:

Publicar un comentario