on Touch#Button=1 do if [Meek#Touch]=0 and [Meek#ResetTouch]=0 gpio 4,1 TaskValueSet 3,1,1 Neopixel,1,5,0,5 timerSet,3,3 timerSet,1,120 timerSet,2,0 else if [Meek#ResetTouch]=0 gpio 4,0 TaskValueSet 3,1,0 Neopixel,1,5,5,5 timerSet,1,0 endif endon on Touch#Button=0 do timerSet,3,0 endon on toggle do if [Meek#Presence]=0 and [Meek#Touch]=0 gpio 4,1 TaskValueSet 3,1,1 Neopixel,1,50,0,50 timerSet,2,0 timerSet,1,0 else gpio 4,0 TaskValueSet 3,1,0 Neopixel,1,50,50,50 timerSet,2,0 timerSet,1,0 endif endon on LightsOff do gpio 4,0 TaskValueSet 3,1,0 Neopixel,1,50,0,50 timerSet,2,0 timerSet,1,0 endon on EnableDetection do TaskValueSet 3,2,0 Neopixel,1,50,50,50 endon on DisableDetection do TaskValueSet 3,2,1 Neopixel,1,0,50,0 endon