개요 |
스위치를 이용하여 BootSelect 하기위해 기본적인 python을 이용한 print 시험 |
구성 |
소스코드 |
#i /user/bin/python from gpiozero import Button import subprocess if Button(2).is_pressed & Button(4).is_pressed: print('Gpio_2 & Gpio_4') elif (not Button(2).is_pressed) & Button(4).is_pressed: print('Gpio_4') elif (not Button(4).is_pressed) & Button(2).is_pressed: print('Gpio_2') else: print('Not Input') |
결과 |