parent
4aea8157de
commit
09efb339ac
|
@ -26,8 +26,7 @@ LEDS_PER_PIXEL = 5
|
||||||
|
|
||||||
# Global variables for LED strip control
|
# Global variables for LED strip control
|
||||||
global strip
|
global strip
|
||||||
strip = neopixel.NeoPixel(pin = board.D18, n = LED_COUNT, auto_write = True, pixel_order = neopixel.RGB)
|
strip = neopixel.NeoPixel(pin = board.D18, n = LED_COUNT, auto_write = False, pixel_order = neopixel.RGB)
|
||||||
strip.auto_write = True
|
|
||||||
|
|
||||||
def register_tube():
|
def register_tube():
|
||||||
# Register or reauthenticate the tube with the server
|
# Register or reauthenticate the tube with the server
|
||||||
|
@ -84,6 +83,8 @@ def on_message(mqttc, obj, msg):
|
||||||
|
|
||||||
for pixel in range(LEDS_PER_PIXEL*5, LEDS_PER_PIXEL*6):
|
for pixel in range(LEDS_PER_PIXEL*5, LEDS_PER_PIXEL*6):
|
||||||
update_led_strip(tuple(eval(rgb_values_list[5])), pixel, strip)
|
update_led_strip(tuple(eval(rgb_values_list[5])), pixel, strip)
|
||||||
|
|
||||||
|
strip.show()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue