print("1")
from machine import Pin
import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
led = Pin(15, Pin.OUT)
button = Pin(12, Pin.IN, Pin.PULL_UP)
def func():
xbutton = 0
if not button.value():
xbutton = 1
else:
xbutton = 0
return(xbutton)
time.sleep(0.1)
while True:
push = func()
if push == 0:
led.toggle()
time.sleep(0.3)
else:
break
print("Hello World")