from machine import Pin
import time
button = Pin(27, Pin.IN, Pin.PULL_DOWN)
button2 = Pin(17, Pin.IN, Pin.PULL_UP)
firstI = 0
secondI = 0
while True:
first = button.value()
time.sleep_ms(100)
second = button2.value()
time.sleep_ms(100)
if first == 1:
firstI = firstI + 1
print('Tlacidlo 1 bolo stlacene', firstI, 'krat')
if second == 0:
secondI = secondI + 1
print('Tlacidlo 2 bolo stlacene', secondI, 'krat')