import utime
import machine
import _thread
button=machine.Pin(16,machine.Pin.IN)
global button_stat
button_stat= False
def button_thread():
while True:
print(button.value())
_thread.start_new_thread(button_thread,()) import utime
import machine
import _thread
button=machine.Pin(16,machine.Pin.IN)
global button_stat
button_stat= False
def button_thread():
while True:
print(button.value())
_thread.start_new_thread(button_thread,())