from machine import Pin
from time import sleep
from neopixel import NeoPixel
ring = NeoPixel(Pin(0), 16)
color = (255,0,0)
off = (0,0,0)
ir = Pin(15,Pin.IN)
if ir.value() == 0:
ring.fill(color)
ring.write()
else:
ring.fill(off)
ring.write()