Code: Select all
from astro_pi import AstroPi #Importing the AstroPi python library.
ap = AstroPi()
temp = ap.get_temperature()
Z = [255, 0, 0]
redhigh = [
Z, Z, Z, Z, Z, Z, Z, Z,
Z, Z, Z, Z, Z, Z, Z, Z,
Z, Z, Z, Z, Z, Z, Z, Z, #Setting the individual neopixels to create a high red equilizer when values are above safe values
Z, Z, Z, Z, Z, Z, Z, Z,
Z, Z, Z, Z, Z, Z, Z, Z,
Z, Z, Z, Z, Z, Z, Z, Z,
Z, Z, Z, Z, Z, Z, Z, Z,
Z, Z, Z, Z, Z, Z, Z, Z
]
event.type = input(ap.show_message("Select variable screen"))
while event.type == KEYLEFT:
while temp < 30:
ap.set_pixels(redhigh)