連接 LOLIN32 Lit 至電腦(USB cable),選擇正確的 COM 埠與開發板型號(例如「WEMOS LOLIN32 Lite」或「ESP32 Dev Module」,若有專屬選項請選擇對應型號)。若驅動需要,安裝對應 CH340 / CP2102 驅動程式。上傳鮑率請選擇 115200 bps。
相關參數設定如下圖:
硬體連接(LED)
內建 LED:多數 LOLIN32 Lite 的 User LED 對應 LED_BUILTIN (以實物為準)。
Blink 範例程式
/* Blink Turns an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at: https://docs.arduino.cc/hardware/ modified 8 May 2014 by Scott Fitzgerald modified 2 Sep 2016 by Arturo Guadalupi modified 8 Sep 2016 by Colby Newman This example code is in the public domain. https://docs.arduino.cc/built-in-examples/basics/Blink/ */
// the setup function runs once when you press reset or power the board
voidsetup(){
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
voidloop(){
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
上傳與測試
先在 USB 連接並上傳 Blink;若上傳失敗,檢查 USB 線、驅動與開發板選項。遇到 “Wrong boot mode detected” 之類訊息,先換線或嘗試手動 Reset(Lolin32 Lite 會自動進入燒錄模式),上傳成功後確認 LED 閃爍。
Blink影片如下:
作者:順哥
email:palmbear@gmail.com
參考資料 1:ESP32 WeMos LOLIN32 Lite high resolution pinout and specs,https://mischianti.org/esp32-wemos-lolin32-lite-high-resolution-pinout-and-specs/
參考資料 2:Chat Everywhere,https://v2.chateverywhere.app/zh
參考資料 3:WeMos LOLIN32 Lite相片,https://www.hobbyelectronica.nl/en/product/lolin32-lite-esp-32/?srsltid=AfmBOorF4n7AuI2vquJZ4Mr0pyaCws4JqpqrfqukliniuSiYuIzDMXbt
Table of Contents
一、簡介
二、外觀
電池接頭:板上有 JST 2‑pin 電池插座(標示 BAT / BATT / VBAT),靠近 USB 與充電電路區域。
LOLIN32 Lite 外觀
三、主要特點
四、硬體規格
WeMos LOLIN32 Lite 接腳圖如下圖:
五、Arduino Blink 範例程式測試
目的:確認板子與開發環境(Arduino IDE)能正常上傳與執行程式,並驗證內建 LED 的運作。
A. 安裝 Arduino IDE。
B. 在「開發板管理員」中加入 Espressif ESP32 支援:在「偏好設定」→「附加開發板網址」加入https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
,然後在「開發板管理員」搜尋並安裝「esp32 by Espressif Systems」。
相關參數設定如下圖:
內建 LED:多數 LOLIN32 Lite 的 User LED 對應 LED_BUILTIN (以實物為準)。
先在 USB 連接並上傳 Blink;若上傳失敗,檢查 USB 線、驅動與開發板選項。遇到 “Wrong boot mode detected” 之類訊息,先換線或嘗試手動 Reset(Lolin32 Lite 會自動進入燒錄模式),上傳成功後確認 LED 閃爍。
Blink影片如下:
六、注意事項