from machine import Pin
from time import sleep_ms
button = Pin(26, Pin.IN, Pin.PULL_DOWN)
num = 0
while True:
if button.value() == 1:
sleep_ms(100)
if button.value() == 1:
num += 1
print(num)
from machine import Pin
from time import sleep_ms
button = Pin(26, Pin.IN, Pin.PULL_DOWN)
num = 0
while True:
if button.value() == 1:
sleep_ms(100)
if button.value() == 1:
num += 1
print(num)