parent
7fd9667251
commit
5d181c8885
|
@ -59,10 +59,8 @@ def is_connected_to_wifi():
|
||||||
return output.split('"')[1]
|
return output.split('"')[1]
|
||||||
|
|
||||||
def update_led_strip(rgb_values, pixel, strip):
|
def update_led_strip(rgb_values, pixel, strip):
|
||||||
print(rgb_values)
|
|
||||||
strip[int(pixel)] = rgb_values
|
strip[int(pixel)] = rgb_values
|
||||||
print("Updated pixel "+str(pixel)+" with "+str(rgb_values))
|
|
||||||
|
|
||||||
def on_message(mqttc, obj, msg):
|
def on_message(mqttc, obj, msg):
|
||||||
rgb_values = (*ast.literal_eval(msg.payload.decode()), )
|
rgb_values = (*ast.literal_eval(msg.payload.decode()), )
|
||||||
if msg.topic == "tube-"+wlan_mac_address+"/p1":
|
if msg.topic == "tube-"+wlan_mac_address+"/p1":
|
||||||
|
|
Loading…
Reference in New Issue