@@ -54,14 +54,14 @@ const char* password = "xxxxxx"; //replace "xxxxxx" with your WIFI's password
5454/* ******************************************************************
5555 * OLED Arguments
5656 */
57- // #define RST_OLED 16 //OLED Reset引脚,需要手动Reset,否则不显示
58- #define OLED_UPDATE_INTERVAL 500 // OLED屏幕刷新间隔ms
59- // SSD1306 display(0x3C, 4, 15); //引脚4��?5是绑定在Kit 32的主板上的,不能做其它用
57+ // #define RST_OLED 16 //OLED Reset pin, requires manual reset, otherwise it will not be displayed
58+ #define OLED_UPDATE_INTERVAL 500 // OLED screen refresh interval ms
59+ // SSD1306 display(0x3C, 4, 15); //Pins 4 and 5 are bound to the motherboard of Kit 32 and cannot be used for other purposes
6060static SSD1306Wire display (0x3c , 500000 , SDA_OLED, SCL_OLED, GEOMETRY_128_64, RST_OLED); // addr , freq , i2c group , resolution , rst
6161
6262
6363/* *******************************************************************
64- * OTA升级配置
64+ * OTA upgrade configuration
6565 */
6666void setupOTA ()
6767{
@@ -81,8 +81,8 @@ void setupOTA()
8181 ArduinoOTA.onStart ([]()
8282 {
8383 display.clear ();
84- display.setFont (ArialMT_Plain_10); // 设置字体大小
85- display.setTextAlignment (TEXT_ALIGN_LEFT);// 设置字体对齐方式
84+ display.setFont (ArialMT_Plain_10); // Set font size
85+ display.setTextAlignment (TEXT_ALIGN_LEFT);// Set font alignment
8686 display.drawString (0 , 0 , " Start Updating...." );
8787
8888 Serial.printf (" Start Updating....Type:%s\n " , (ArduinoOTA.getCommand () == U_FLASH) ? " sketch" : " filesystem" );
@@ -169,22 +169,22 @@ void setupWIFI()
169169 display.drawString (0 , 10 , String (ssid));
170170 display.display ();
171171
172- // 连接WiFi,删除旧的配置,关闭WIFI,准备重新配��?
172+ // Connect to WiFi, delete old configuration, turn off WiFi, prepare to reconfigure
173173 WiFi.disconnect (true );
174174 delay (1000 );
175175
176176 WiFi.mode (WIFI_STA);
177177 // WiFi.onEvent(WiFiEvent);
178178 WiFi.setAutoConnect (true );
179- WiFi.setAutoReconnect (true ); // 断开WiFi后自动重新连��?ESP32不可��?
179+ WiFi.setAutoReconnect (true ); // Automatically reconnect after disconnecting WiFi ESP32 is not available
180180 // WiFi.setHostname(HOSTNAME);
181181 WiFi.begin (ssid, password);
182182#if USE_STATIC_IP
183183 WiFi.config (staticIP, gateway, subnet);
184184#endif
185185
186- // 等待5000ms,如果没有连接上,就继续往��?
187- // 不然基本功能不可��?
186+ // Wait for 5000ms, if not connected, continue
187+
188188 byte count = 0 ;
189189 while (WiFi.status () != WL_CONNECTED && count < 10 )
190190 {
@@ -239,7 +239,7 @@ void loop()
239239}
240240
241241/* ***************************************************
242- * [通用函数] ESP32 WiFi Kit 32事件处理
242+ * [Universal Function] ESP32 WiFi Kit 32 Event Handling
243243 */
244244void WiFiEvent (WiFiEvent_t event)
245245{
0 commit comments