from machine import Pin
import neopixel
import time
counter=0
debounce_time=0
pin = Pin(20, Pin.IN, Pin.PULL_UP)
# NONE = (0, 0, 0)
# RED = (100, 0, 0)
# GREEN = (0, 100, 0)
# pixels = neopixel.NeoPixel(board.GP28, 1)
# pixels[0] = RED
# Update the strip.
# n.write()
while True:
if ((pin.value() is 0) and (time.ticks_ms()-debounce_time) > 300):
counter+=1
debounce_time=time.ticks_ms()
print("Button Pressed")
print("Count={}".format(counter))