parent
dbb527400f
commit
4b694a93b2
|
@ -59,11 +59,13 @@ def is_connected_to_wifi():
|
|||
return output.split('"')[1]
|
||||
|
||||
def update_led_strip(rgb_values, pixel, strip):
|
||||
print(pixel)
|
||||
print(rgb_values)
|
||||
print("")
|
||||
strip[int(pixel)] = rgb_values
|
||||
|
||||
def on_message(mqttc, obj, msg):
|
||||
rgb_values_list = eval(msg.payload.decode())
|
||||
print(rgb_values_list)
|
||||
|
||||
for pixel in range(LEDS_PER_PIXEL):
|
||||
update_led_strip(tuple(eval(rgb_values_list[0])), pixel, strip)
|
||||
|
|
Loading…
Reference in New Issue