合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
# network_范例 ***** * [ ] **屏幕显示扫描热点** ``` import network, time,lcd import image from machine import UART from Maix import GPIO from fpioa_manager import fm, board_info lcd.init() fm.register(8, fm.fpioa.GPIOHS0) wifi_en=GPIO(GPIO.GPIOHS0, GPIO.OUT) fm.register(board_info.WIFI_RX, fm.fpioa.UART2_TX) fm.register(board_info.WIFI_TX, fm.fpioa.UART2_RX) wifi_en.value(1) uart = UART(UART.UART2,115200,timeout=1000, read_buf_len=4096) time.sleep(2) nic = network.ESP8285(uart) while 1: img = image.Image() ap_info = nic.scan() print(ap_info ) num=0 for info in ap_info: img.draw_string(0,num,info, color=(0,255,0), scale=2) num=num+16 if num>=240: img = image.Image() num=0 time.sleep(0.2) lcd.display(img) ```