#print("Hello, ESP32!")
# 在这里写上你的代码 :-)
from machine import Pin
from time import sleep_ms
from machine import UART
uart1 = UART(1, baudrate=9600, tx=33, rx=32)
uart1.write('hello') # write 5 bytes
uart1.read(5) # read up to 5 bytes
led = Pin(14,Pin.OUT)
led1 = Pin(2,Pin.OUT)
sw = Pin(13,Pin.IN,Pin.PULL_UP)
while 1:
led.value(1)
led1.off()
sleep_ms(500)
led.off()
led1.high()
sleep_ms(500)
print(sw.value())