from machine import Pin
import neopixel
import time

taster = Pin(39, Pin.IN)
np = neopixel.NeoPixel(Pin(27),1)

while True:    
    if taster.value() == 1:
        np[0] = (0, 100, 0)
        np.write()
        time.sleep(0.1)
    else:
        np[0] = (100,0,0)
        np.write()
        time.sleep(2)


