from gpiozero import Button
from time import sleep

btn1 = Button(21)                        
btn2 = Button(22)                          
btn3 = Button(23)                          
btn4 = Button(24)                             
btn5 = Button(25)                        
btn6 = Button(26)                          


def handleBtnPress(btn):
    pinNum = btn.pin.number
    print("button pressed = "+pinNum)

    
# tell the button what to do when pressed
btn1.when_pressed = handleBtnPress
btn2.when_pressed = handleBtnPress
btn3.when_pressed = handleBtnPress
btn4.when_pressed = handleBtnPress
btn5.when_pressed = handleBtnPress
btn6.when_pressed = handleBtnPress


while True:
	print("Press button")
	sleep(3)
