'''
▶ 프로그램: slide switch 사용하기
▷ 주의) 계속 switch의 value가 1이면, 계속 출력됨!
'''
import machine
import time
switch = machine.Pin(28, machine.Pin.IN)
while True:
if switch.value() == 1:
print("hello")
time.sleep(1)
'''
▶ 프로그램: slide switch 사용하기
▷ 주의) 계속 switch의 value가 1이면, 계속 출력됨!
'''
import machine
import time
switch = machine.Pin(28, machine.Pin.IN)
while True:
if switch.value() == 1:
print("hello")
time.sleep(1)