honny 的 Shell 視窗中,您可以輸入簡單的 Python 命令來測試。
範例測試代碼:
python
複製程式碼
import machine
import time
led = machine.Pin(4, machine.Pin.OUT)
while True:
led.on()
time.sleep(1)
led.off()
將此代碼貼到 Thonny 的編輯器中,然後點擊 「保存」,將其保存為 main.py,上傳到 ESP32-CAM。