print("Look mom, two hands!")
from machine import Pin
from time import sleep
RED1 = Pin(14, Pin.OUT)
GREEN1 = Pin(27, Pin.OUT)
BLUE1 = Pin(26, Pin.OUT)
LED1 = [RED1, GREEN1, BLUE1]
RED2 = Pin(15, Pin.OUT)
GREEN2 = Pin(4, Pin.OUT)
BLUE2 = Pin(2, Pin.OUT)
LED2 = [RED2, GREEN2, BLUE2]
# We would get this sent and set from MQTT, as well as RGB values. Just POC
# PAD_SIDE = "LEFT"
PAD_SIDE = "RIGHT"
while True:
if PAD_SIDE == "LEFT":
for led1 in LED1:
RED1.value(1)
GREEN1.value(1)
BLUE1.value(1)
led1.value(0)
sleep(0.2)
RED1.value(0)
GREEN1.value(0)
BLUE1.value(0)
led1.value(1)
sleep(0.2)
RED1.value(0)
GREEN1.value(0)
BLUE1.value(0)
sleep(0.5)
if PAD_SIDE == "RIGHT":
for led2 in LED2:
RED2.value(1)
GREEN2.value(1)
BLUE2.value(1)
led2.value(0)
sleep(0.2)
RED1.value(0)
GREEN1.value(0)
BLUE1.value(0)
led2.value(1)
sleep(0.2)
RED2.value(0)
GREEN2.value(0)
BLUE2.value(0)
sleep(0.5)