from machine import Pin,PWM,ADC   
import utime
import neopixel

left=ADC(Pin(35))
right=ADC(Pin(34))
button = Pin(18,Pin.IN)
RGB_pin = Pin(25, Pin.OUT)
np = neopixel.NeoPixel(RGB_pin, n=4, bpp=3, timing=1)
def setup():
    for i in range(0,4):
        np[i] = (0,0,0)
    np.write()

def loop():
    while button.value() == 1:
        pass
    else:
        while True:
            ADC_L=left.read()
            ADC_R=right.read()
            print("ADC_L:",ADC_L)
            print("ADC_R:",ADC_R)
            ADC_SUM = ADC_L + ADC_R
            if ADC_SUM > 8000:
                for n in range(0,4):
                    np[n] = (255,255,255)
                np.write()
            else:
                for n in range(0,4):
                    np[n] = (0,0,0)
                np.write()

if __name__ == "__main__":
    setup()
    loop()
