插上开发板后查看,在设备管理器中查看端口(Windows+R 输入devmgmt.msc),如果未识别需要下载安装驱动,记住这里的端口号(如:COM3).
打开命令行依次执行
(1) 安装esptool 输入:
pip install esptool
esptool.py --port COM3 erase_flash
esptool.py --port COM3 --baud 115200 write_flash -z 0x1000 C:\esp32-20171102-v1.9.2-443-g236297f4.bin --verify
Welcome to MicroPython on the ESP32!
For generic online docs please visit http://docs.micropython.org/
For access to the hardware use the 'machine' module:
import machine
pin12 = machine.Pin(12, machine.Pin.OUT)
pin12.value(1)
pin13 = machine.Pin(13, machine.Pin.IN, machine.Pin.PULL_UP)
print(pin13.value())
i2c = machine.I2C(scl=machine.Pin(21), sda=machine.Pin(22))
i2c.scan()
i2c.writeto(addr, b'1234')
i2c.readfrom(addr, 4)
Basic WiFi configuration:
import network
sta_if = network.WLAN(network.STA_IF); sta_if.active(True)
sta_if.scan() # Scan for available access points
sta_if.connect("<AP_name>", "<password>") # Connect to an AP
sta_if.isconnected() # Check for successful connection
Control commands:
CTRL-A -- on a blank line, enter raw REPL mode
CTRL-B -- on a blank line, enter normal REPL mode
CTRL-C -- interrupt a running program
CTRL-D -- on a blank line, do a soft reset of the board
CTRL-E -- on a blank line, enter paste mode
For further help on a specific object, type help(obj)
For a list of available modules, type help('modules')
For further help on a specific object, type help(obj)
For a list of available modules, type help('modules')
help('modules')
main framebuf re upip
_boot gc select upip_utarfile
_onewire hashlib socket upysh
_thread heapq ssl urandom
apa106 inisetup struct ure
array io sys urequests
binascii json time uselect
btree machine ubinascii usocket
builtins math ucollections ussl
cmath micropython uctypes ustruct
collections neopixel uerrno utime
dht network uhashlib utimeq
ds18x20 ntptime uheapq uzlib
errno onewire uio zlib
esp os ujson
flashbdev random uos
Plus any modules on the filesystem
help(network)
object <module 'network'> is of type module
name -- network
init -- <function>
WLAN -- <function>
LAN -- <function>
phy_mode -- <function>
STA_IF -- 0
AP_IF -- 1
MODE_11B -- 1
MODE_11G -- 2
MODE_11N -- 4
AUTH_OPEN -- 0
AUTH_WEP -- 1
AUTH_WPA_PSK -- 2
AUTH_WPA2_PSK -- 3
AUTH_WPA_WPA2_PSK -- 4
AUTH_MAX -- 6
PHY_LAN8720 -- 0
PHY_TLK110 -- 1
AMR是Autonomous Mobile Robot的缩写,即自主移动机器人,是集环境感知,动态决策规划,行为控制与执行等多功能于一体的综合系统。
本节主要讲解WifiBoard类的功能和HTTPClient库及cJSON的使用。
本节主要讲解TFT-LCD显示屏的使用和Window派生类与TFT_eSPI库的使用。
这篇文章展示了如何将化学与工程、信息技术、现代制造技术紧密结合,以“血氧指标控制的简易供氧器”为载体,组织一次真实的跨学科项目。设计中突出“从需求出发”“闭环控制”“可视化反馈”,不仅呼应了新课标中“跨学科实践”的要求,更贴近生活实际需求,尤其适用于对科技应用、健康关怀有兴趣的学生群体,可作为项目式学习或社团活动的优质课例。
本节主要讲解OLED显示屏的使用和Display类及派生类的介绍及使用。
本节主要讲解用TM1650来驱动四位7段式数码管模块的显示使用。
本节主要讲解FreeRTOS任务间如何使用互斥对象来实现资源互斥访问。
在ESP32的开发,经常会有系统崩溃一直重启的情况,那么如何快速定位出现异常的代码呢?
本节主要讲解FreeRTOS任务间如何使用消息队列、事件组和二进制信号量进行通信。
本节主要讲解Task类,FreeRTOS多任务的使用。
本节主要讲解Timer类,FreeRTOS定时器的使用。