import machine
import time
buttonpin = machine.Pin(0, machine.Pin.IN)
ledextern = machine.Pin(14, machine.Pin.OUT)
while True:
print(buttonpin.value())
ledextern.value(not buttonpin.value())
time.sleep(1)
import machine
import time
buttonpin = machine.Pin(0, machine.Pin.IN)
ledextern = machine.Pin(14, machine.Pin.OUT)
while True:
print(buttonpin.value())
ledextern.value(not buttonpin.value())
time.sleep(1)