import time
from machine import Pin
time.sleep(0.01)
# Configure GPIO pins
#led = Pin(15, Pin.OUT)
button = Pin(14, Pin.IN, Pin.PULL_UP)
counter = 0
while True:
if button.value() == 0: #if button is pressed
counter += 1
else:
counter == counter
print(counter)
time.sleep(0.1)