From 13e7a0a027d313c10390d0ae9ee842f467420edc Mon Sep 17 00:00:00 2001 From: qq283938350 <283938350@qq.com> Date: Sat, 5 Aug 2023 18:18:30 +0800 Subject: [PATCH] ArduinoUi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用按键控制的UI --- esp32UI/UI/.vscode/arduino.json | 7 + esp32UI/UI/.vscode/c_cpp_properties.json | 602 ++++++++++ esp32UI/UI/.vscode/extensions.json | 5 + esp32UI/UI/.vscode/launch.json | 24 + esp32UI/UI/.vscode/settings.json | 58 + esp32UI/UI/.vscode/tasks.json | 78 ++ esp32UI/UI/UI.ino | 1308 ++++++++++++++++++++++ esp32UI/UI/新建文本文档 (2).txt | 80 ++ 8 files changed, 2162 insertions(+) create mode 100644 esp32UI/UI/.vscode/arduino.json create mode 100644 esp32UI/UI/.vscode/c_cpp_properties.json create mode 100644 esp32UI/UI/.vscode/extensions.json create mode 100644 esp32UI/UI/.vscode/launch.json create mode 100644 esp32UI/UI/.vscode/settings.json create mode 100644 esp32UI/UI/.vscode/tasks.json create mode 100644 esp32UI/UI/UI.ino create mode 100644 esp32UI/UI/新建文本文档 (2).txt diff --git a/esp32UI/UI/.vscode/arduino.json b/esp32UI/UI/.vscode/arduino.json new file mode 100644 index 0000000..1348d1d --- /dev/null +++ b/esp32UI/UI/.vscode/arduino.json @@ -0,0 +1,7 @@ +{ + "port": "COM4", + "configuration": "JTAGAdapter=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none", + "board": "esp32:esp32:esp32", + "programmer": "esptool", + "sketch": "UI.ino" +} \ No newline at end of file diff --git a/esp32UI/UI/.vscode/c_cpp_properties.json b/esp32UI/UI/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..373d342 --- /dev/null +++ b/esp32UI/UI/.vscode/c_cpp_properties.json @@ -0,0 +1,602 @@ +{ + "version": 4, + "configurations": [ + { + "name": "windows-gcc-x64", + "compilerPath": "C:/mingw64/bin/gcc.exe", + "compilerArgs": [ + "" + ], + "intelliSenseMode": "windows-gcc-x64", + "includePath": [ + "${workspaceFolder}/**" + ], + "forcedInclude": [], + "cStandard": "${default}", + "cppStandard": "${default}", + "defines": [] + }, + { + "name": "Arduino", + "compilerPath": "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\bin\\xtensa-esp32-elf-g++", + "compilerArgs": [ + "-mlongcalls", + "-Wno-frame-address", + "-ffunction-sections", + "-fdata-sections", + "-Wno-error=unused-function", + "-Wno-error=unused-variable", + "-Wno-error=deprecated-declarations", + "-Wno-unused-parameter", + "-Wno-sign-compare", + "-freorder-blocks", + "-Wwrite-strings", + "-fstack-protector", + "-fstrict-volatile-bitfields", + "-Wno-error=unused-but-set-variable", + "-fno-jump-tables", + "-fno-tree-switch-conversion", + "-std=gnu++11", + "-fexceptions", + "-fno-rtti" + ], + "intelliSenseMode": "gcc-x64", + "includePath": [ + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\newlib\\platform_include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\freertos\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\freertos\\include\\esp_additions\\freertos", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\freertos\\port\\xtensa\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\freertos\\include\\esp_additions", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_hw_support\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_hw_support\\include\\soc", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_hw_support\\include\\soc\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_hw_support\\port\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_hw_support\\port\\esp32\\private_include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\heap\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\log\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\lwip\\include\\apps", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\lwip\\include\\apps\\sntp", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\lwip\\lwip\\src\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\lwip\\port\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\lwip\\port\\esp32\\include\\arch", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\soc\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\soc\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\soc\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\hal\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\hal\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\hal\\platform_port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_rom\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_rom\\include\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_rom\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_common\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_system\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_system\\port\\soc", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_system\\port\\public_compat", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\xtensa\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\xtensa\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\driver\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\driver\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_pm\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_ringbuf\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\efuse\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\efuse\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\vfs\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_wifi\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_event\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_netif\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_eth\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\tcpip_adapter\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_phy\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_phy\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_ipc\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\app_trace\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_timer\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\mbedtls\\port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\mbedtls\\mbedtls\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\mbedtls\\esp_crt_bundle\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\app_update\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\spi_flash\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bootloader_support\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\nvs_flash\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\pthread\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_gdbstub\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_gdbstub\\xtensa", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_gdbstub\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espcoredump\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espcoredump\\include\\port\\xtensa", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\wpa_supplicant\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\wpa_supplicant\\port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\wpa_supplicant\\esp_supplicant\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\ieee802154\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\console", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\asio\\asio\\asio\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\asio\\port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\common\\osi\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\include\\esp32\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\common\\api\\include\\api", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\common\\btc\\profile\\esp\\blufi\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\common\\btc\\profile\\esp\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\host\\bluedroid\\api\\include\\api", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_common\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_common\\tinycrypt\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_core", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_core\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_core\\storage", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\btc\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_models\\common\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_models\\client\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\mesh_models\\server\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\api\\core\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\api\\models\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\bt\\esp_ble_mesh\\api", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\cbor\\port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\unity\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\unity\\unity\\src", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\cmock\\CMock\\src", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\coap\\port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\coap\\libcoap\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\nghttp\\port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\nghttp\\nghttp2\\lib\\includes", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-tls", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-tls\\esp-tls-crypto", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_adc_cal\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_hid\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\tcp_transport\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_http_client\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_http_server\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_https_ota\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_https_server\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_lcd\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_lcd\\interface", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\protobuf-c\\protobuf-c", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\protocomm\\include\\common", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\protocomm\\include\\security", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\protocomm\\include\\transports", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\mdns\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_local_ctrl\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\sdmmc\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_serial_slave_link\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_websocket_client\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\expat\\expat\\expat\\lib", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\expat\\port\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\wear_levelling\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\fatfs\\diskio", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\fatfs\\vfs", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\fatfs\\src", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\freemodbus\\freemodbus\\common\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\idf_test\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\idf_test\\include\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\jsmn\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\json\\cJSON", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\libsodium\\libsodium\\src\\libsodium\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\libsodium\\port_include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\mqtt\\esp-mqtt\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\openssl\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\perfmon\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\spiffs\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\ulp\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\wifi_provisioning\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\rmaker_common\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_diagnostics\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\rtc_store\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_insights\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\json_parser\\upstream\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\json_parser\\upstream", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\json_generator\\upstream", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_schedule\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp_secure_cert_mgr\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_rainmaker\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\gpio_button\\button\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\qrcode\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\ws2812_led", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp_littlefs\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\tool", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\typedef", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\image", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\math", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\nn", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\layer", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\detect", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-dl\\include\\model_zoo", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-sr\\src\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-sr\\esp-tts\\esp_tts_chinese\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp-sr\\include\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp32-camera\\driver\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\esp32-camera\\conversions\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\dotprod\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\support\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\windows\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\windows\\hann\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\windows\\blackman\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\windows\\blackman_harris\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\windows\\blackman_nuttall\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\windows\\nuttall\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\windows\\flat_top\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\iir\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\fir\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\math\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\math\\add\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\math\\sub\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\math\\mul\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\math\\addc\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\math\\mulc\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\math\\sqrt\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\matrix\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\fft\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\dct\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\conv\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\common\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\kalman\\ekf\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\espressif__esp-dsp\\modules\\kalman\\ekf_imu13states\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\include\\fb_gfx\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\tools\\sdk\\esp32\\qio_qspi\\include", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\cores\\esp32", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\variants\\esp32", + "C:\\Users\\Fxue\\Documents\\Arduino\\libraries\\U8g2\\src", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\libraries\\Wire\\src", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\libraries\\WiFi\\src", + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\libraries\\SPI\\src", + "c:\\users\\fxue\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32-elf\\include\\c++\\8.4.0", + "c:\\users\\fxue\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32-elf\\include\\c++\\8.4.0\\xtensa-esp32-elf", + "c:\\users\\fxue\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32-elf\\include\\c++\\8.4.0\\backward", + "c:\\users\\fxue\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\lib\\gcc\\xtensa-esp32-elf\\8.4.0\\include", + "c:\\users\\fxue\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\lib\\gcc\\xtensa-esp32-elf\\8.4.0\\include-fixed", + "c:\\users\\fxue\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32-elf\\sys-include", + "c:\\users\\fxue\\appdata\\local\\arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\esp-2021r2-patch5-8.4.0\\xtensa-esp32-elf\\include" + ], + "forcedInclude": [ + "C:\\Users\\Fxue\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.9\\cores\\esp32\\Arduino.h" + ], + "cStandard": "c11", + "cppStandard": "c++11", + "defines": [ + "HAVE_CONFIG_H", + "MBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"", + "UNITY_INCLUDE_CONFIG_H", + "WITH_POSIX", + "_GNU_SOURCE", + "IDF_VER=\"v4.4.4\"", + "ESP_PLATFORM", + "_POSIX_READER_WRITER_LOCKS", + "F_CPU=240000000L", + "ARDUINO=10607", + "ARDUINO_ESP32_DEV", + "ARDUINO_ARCH_ESP32", + "ARDUINO_BOARD=\"ESP32_DEV\"", + "ARDUINO_VARIANT=\"esp32\"", + "ARDUINO_PARTITION_default", + "ESP32", + "CORE_DEBUG_LEVEL=0", + "ARDUINO_RUNNING_CORE=1", + "ARDUINO_EVENT_RUNNING_CORE=1", + "ARDUINO_USB_CDC_ON_BOOT=0", + "__DBL_MIN_EXP__=(-1021)", + "__FLT32X_MAX_EXP__=1024", + "__cpp_attributes=200809", + "__UINT_LEAST16_MAX__=0xffff", + "__ATOMIC_ACQUIRE=2", + "__FLT_MIN__=1.1754943508222875e-38F", + "__GCC_IEC_559_COMPLEX=0", + "__cpp_aggregate_nsdmi=201304", + "__UINT_LEAST8_TYPE__=unsigned char", + "__INTMAX_C(c)=c ## LL", + "__CHAR_BIT__=8", + "__UINT8_MAX__=0xff", + "__WINT_MAX__=0xffffffffU", + "__FLT32_MIN_EXP__=(-125)", + "__cpp_static_assert=200410", + "__ORDER_LITTLE_ENDIAN__=1234", + "__SIZE_MAX__=0xffffffffU", + "__WCHAR_MAX__=0xffff", + "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1", + "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1", + "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1", + "__DBL_DENORM_MIN__=double(4.9406564584124654e-324L)", + "__GCC_ATOMIC_CHAR_LOCK_FREE=2", + "__GCC_IEC_559=0", + "__FLT32X_DECIMAL_DIG__=17", + "__FLT_EVAL_METHOD__=0", + "__cpp_binary_literals=201304", + "__FLT64_DECIMAL_DIG__=17", + "__GCC_ATOMIC_CHAR32_T_LOCK_FREE=2", + "__cpp_variadic_templates=200704", + "__UINT_FAST64_MAX__=0xffffffffffffffffULL", + "__SIG_ATOMIC_TYPE__=int", + "__DBL_MIN_10_EXP__=(-307)", + "__FINITE_MATH_ONLY__=0", + "__cpp_variable_templates=201304", + "__GNUC_PATCHLEVEL__=0", + "__FLT32_HAS_DENORM__=1", + "__UINT_FAST8_MAX__=0xffffffffU", + "__has_include(STR)=__has_include__(STR)", + "__DEC64_MAX_EXP__=385", + "__INT8_C(c)=c", + "__INT_LEAST8_WIDTH__=8", + "__UINT_LEAST64_MAX__=0xffffffffffffffffULL", + "__SHRT_MAX__=0x7fff", + "__LDBL_MAX__=1.7976931348623157e+308L", + "__UINT_LEAST8_MAX__=0xff", + "__GCC_ATOMIC_BOOL_LOCK_FREE=2", + "__UINTMAX_TYPE__=long long unsigned int", + "__DEC32_EPSILON__=1E-6DF", + "__FLT_EVAL_METHOD_TS_18661_3__=0", + "__CHAR_UNSIGNED__=1", + "__UINT32_MAX__=0xffffffffU", + "__GXX_EXPERIMENTAL_CXX0X__=1", + "__LDBL_MAX_EXP__=1024", + "__WINT_MIN__=0U", + "__INT_LEAST16_WIDTH__=16", + "__SCHAR_MAX__=0x7f", + "__WCHAR_MIN__=0", + "__INT64_C(c)=c ## LL", + "__DBL_DIG__=15", + "__GCC_ATOMIC_POINTER_LOCK_FREE=2", + "__SIZEOF_INT__=4", + "__SIZEOF_POINTER__=4", + "__GCC_ATOMIC_CHAR16_T_LOCK_FREE=2", + "__USER_LABEL_PREFIX__", + "__STDC_HOSTED__=1", + "__LDBL_HAS_INFINITY__=1", + "__XTENSA_EL__=1", + "__FLT32_DIG__=6", + "__FLT_EPSILON__=1.1920928955078125e-7F", + "__GXX_WEAK__=1", + "__SHRT_WIDTH__=16", + "__LDBL_MIN__=2.2250738585072014e-308L", + "__DEC32_MAX__=9.999999E96DF", + "__cpp_threadsafe_static_init=200806", + "__FLT32X_HAS_INFINITY__=1", + "__INT32_MAX__=0x7fffffff", + "__INT_WIDTH__=32", + "__SIZEOF_LONG__=4", + "__UINT16_C(c)=c", + "__PTRDIFF_WIDTH__=32", + "__DECIMAL_DIG__=17", + "__FLT64_EPSILON__=2.2204460492503131e-16F64", + "__INTMAX_WIDTH__=64", + "__FLT64_MIN_EXP__=(-1021)", + "__has_include_next(STR)=__has_include_next__(STR)", + "__LDBL_HAS_QUIET_NAN__=1", + "__FLT64_MANT_DIG__=53", + "__GNUC__=8", + "__GXX_RTTI=1", + "__cpp_delegating_constructors=200604", + "__FLT_HAS_DENORM__=1", + "__SIZEOF_LONG_DOUBLE__=8", + "__BIGGEST_ALIGNMENT__=16", + "__STDC_UTF_16__=1", + "__FLT64_MAX_10_EXP__=308", + "__FLT32_HAS_INFINITY__=1", + "__DBL_MAX__=double(1.7976931348623157e+308L)", + "__cpp_raw_strings=200710", + "__INT_FAST32_MAX__=0x7fffffff", + "__DBL_HAS_INFINITY__=1", + "__DEC32_MIN_EXP__=(-94)", + "__INTPTR_WIDTH__=32", + "__FLT32X_HAS_DENORM__=1", + "__INT_FAST16_TYPE__=int", + "__LDBL_HAS_DENORM__=1", + "__cplusplus=201402L", + "__cpp_ref_qualifiers=200710", + "__DEC128_MAX__=9.999999999999999999999999999999999E6144DL", + "__INT_LEAST32_MAX__=0x7fffffff", + "__DEC32_MIN__=1E-95DF", + "__DEPRECATED=1", + "__cpp_rvalue_references=200610", + "__DBL_MAX_EXP__=1024", + "__WCHAR_WIDTH__=16", + "__FLT32_MAX__=3.4028234663852886e+38F32", + "__DEC128_EPSILON__=1E-33DL", + "__PTRDIFF_MAX__=0x7fffffff", + "__FLT32_HAS_QUIET_NAN__=1", + "__GNUG__=8", + "__LONG_LONG_MAX__=0x7fffffffffffffffLL", + "__SIZEOF_SIZE_T__=4", + "__cpp_rvalue_reference=200610", + "__cpp_nsdmi=200809", + "__SIZEOF_WINT_T__=4", + "__LONG_LONG_WIDTH__=64", + "__cpp_initializer_lists=200806", + "__FLT32_MAX_EXP__=128", + "__cpp_hex_float=201603", + "__GXX_ABI_VERSION=1013", + "__FLT_MIN_EXP__=(-125)", + "__cpp_lambdas=200907", + "__INT_FAST64_TYPE__=long long int", + "__FP_FAST_FMAF=1", + "__FLT64_DENORM_MIN__=4.9406564584124654e-324F64", + "__DBL_MIN__=double(2.2250738585072014e-308L)", + "__FLT32X_EPSILON__=2.2204460492503131e-16F32x", + "__FLT64_MIN_10_EXP__=(-307)", + "__DEC128_MIN__=1E-6143DL", + "__REGISTER_PREFIX__", + "__UINT16_MAX__=0xffff", + "__DBL_HAS_DENORM__=1", + "__FLT32_MIN__=1.1754943508222875e-38F32", + "__UINT8_TYPE__=unsigned char", + "__NO_INLINE__=1", + "__FLT_MANT_DIG__=24", + "__LDBL_DECIMAL_DIG__=17", + "__VERSION__=\"8.4.0\"", + "__UINT64_C(c)=c ## ULL", + "__cpp_unicode_characters=200704", + "__cpp_decltype_auto=201304", + "__GCC_ATOMIC_INT_LOCK_FREE=2", + "__FLT32_MANT_DIG__=24", + "__FLOAT_WORD_ORDER__=__ORDER_LITTLE_ENDIAN__", + "__SCHAR_WIDTH__=8", + "__INT32_C(c)=c", + "__DEC64_EPSILON__=1E-15DD", + "__ORDER_PDP_ENDIAN__=3412", + "__DEC128_MIN_EXP__=(-6142)", + "__FLT32_MAX_10_EXP__=38", + "__INT_FAST32_TYPE__=int", + "__UINT_LEAST16_TYPE__=short unsigned int", + "__INT16_MAX__=0x7fff", + "__cpp_rtti=199711", + "__SIZE_TYPE__=unsigned int", + "__UINT64_MAX__=0xffffffffffffffffULL", + "__INT8_TYPE__=signed char", + "__cpp_digit_separators=201309", + "__ELF__=1", + "__xtensa__=1", + "__FLT_RADIX__=2", + "__INT_LEAST16_TYPE__=short int", + "__LDBL_EPSILON__=2.2204460492503131e-16L", + "__UINTMAX_C(c)=c ## ULL", + "__SIG_ATOMIC_MAX__=0x7fffffff", + "__GCC_ATOMIC_WCHAR_T_LOCK_FREE=2", + "__SIZEOF_PTRDIFF_T__=4", + "__FLT32X_MANT_DIG__=53", + "__FLT32X_MIN_EXP__=(-1021)", + "__DEC32_SUBNORMAL_MIN__=0.000001E-95DF", + "__INT_FAST16_MAX__=0x7fffffff", + "__FLT64_DIG__=15", + "__UINT_FAST32_MAX__=0xffffffffU", + "__UINT_LEAST64_TYPE__=long long unsigned int", + "__FLT_HAS_QUIET_NAN__=1", + "__FLT_MAX_10_EXP__=38", + "__LONG_MAX__=0x7fffffffL", + "__DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL", + "__FLT_HAS_INFINITY__=1", + "__cpp_unicode_literals=200710", + "__UINT_FAST16_TYPE__=unsigned int", + "__DEC64_MAX__=9.999999999999999E384DD", + "__INT_FAST32_WIDTH__=32", + "__CHAR16_TYPE__=short unsigned int", + "__PRAGMA_REDEFINE_EXTNAME=1", + "__SIZE_WIDTH__=32", + "__INT_LEAST16_MAX__=0x7fff", + "__DEC64_MANT_DIG__=16", + "__INT64_MAX__=0x7fffffffffffffffLL", + "__UINT_LEAST32_MAX__=0xffffffffU", + "__FLT32_DENORM_MIN__=1.4012984643248171e-45F32", + "__GCC_ATOMIC_LONG_LOCK_FREE=2", + "__SIG_ATOMIC_WIDTH__=32", + "__INT_LEAST64_TYPE__=long long int", + "__INT16_TYPE__=short int", + "__INT_LEAST8_TYPE__=signed char", + "__DEC32_MAX_EXP__=97", + "__INT_FAST8_MAX__=0x7fffffff", + "__INTPTR_MAX__=0x7fffffff", + "__cpp_sized_deallocation=201309", + "__cpp_range_based_for=200907", + "__FLT64_HAS_QUIET_NAN__=1", + "__FLT32_MIN_10_EXP__=(-37)", + "__EXCEPTIONS=1", + "__LDBL_MANT_DIG__=53", + "__DBL_HAS_QUIET_NAN__=1", + "__FLT64_HAS_INFINITY__=1", + "__SIG_ATOMIC_MIN__=(-__SIG_ATOMIC_MAX__ - 1)", + "__cpp_return_type_deduction=201304", + "__INTPTR_TYPE__=int", + "__UINT16_TYPE__=short unsigned int", + "__WCHAR_TYPE__=short unsigned int", + "__SIZEOF_FLOAT__=4", + "__UINTPTR_MAX__=0xffffffffU", + "__INT_FAST64_WIDTH__=64", + "__DEC64_MIN_EXP__=(-382)", + "__cpp_decltype=200707", + "__FLT32_DECIMAL_DIG__=9", + "__INT_FAST64_MAX__=0x7fffffffffffffffLL", + "__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1", + "__FLT_DIG__=6", + "__UINT_FAST64_TYPE__=long long unsigned int", + "__INT_MAX__=0x7fffffff", + "__INT64_TYPE__=long long int", + "__FLT_MAX_EXP__=128", + "__DBL_MANT_DIG__=53", + "__cpp_inheriting_constructors=201511", + "__INT_LEAST64_MAX__=0x7fffffffffffffffLL", + "__FP_FAST_FMAF32=1", + "__DEC64_MIN__=1E-383DD", + "__WINT_TYPE__=unsigned int", + "__UINT_LEAST32_TYPE__=unsigned int", + "__SIZEOF_SHORT__=2", + "__LDBL_MIN_EXP__=(-1021)", + "__FLT64_MAX__=1.7976931348623157e+308F64", + "__WINT_WIDTH__=32", + "__INT_LEAST8_MAX__=0x7f", + "__FLT32X_MAX_10_EXP__=308", + "__WCHAR_UNSIGNED__=1", + "__LDBL_MAX_10_EXP__=308", + "__ATOMIC_RELAXED=0", + "__DBL_EPSILON__=double(2.2204460492503131e-16L)", + "__XTENSA_WINDOWED_ABI__=1", + "__UINT8_C(c)=c", + "__FLT64_MAX_EXP__=1024", + "__INT_LEAST32_TYPE__=int", + "__SIZEOF_WCHAR_T__=2", + "__INT_FAST8_TYPE__=int", + "__GNUC_STDC_INLINE__=1", + "__FLT64_HAS_DENORM__=1", + "__FLT32_EPSILON__=1.1920928955078125e-7F32", + "__DBL_DECIMAL_DIG__=17", + "__STDC_UTF_32__=1", + "__INT_FAST8_WIDTH__=32", + "__DEC_EVAL_METHOD__=2", + "__FLT32X_MAX__=1.7976931348623157e+308F32x", + "__XTENSA__=1", + "__ORDER_BIG_ENDIAN__=4321", + "__cpp_runtime_arrays=198712", + "__UINT64_TYPE__=long long unsigned int", + "__UINT32_C(c)=c ## U", + "__INTMAX_MAX__=0x7fffffffffffffffLL", + "__cpp_alias_templates=200704", + "__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__", + "__FLT_DENORM_MIN__=1.4012984643248171e-45F", + "__INT8_MAX__=0x7f", + "__LONG_WIDTH__=32", + "__UINT_FAST32_TYPE__=unsigned int", + "__CHAR32_TYPE__=unsigned int", + "__FLT_MAX__=3.4028234663852886e+38F", + "__cpp_constexpr=201304", + "__INT32_TYPE__=int", + "__SIZEOF_DOUBLE__=8", + "__cpp_exceptions=199711", + "__FLT_MIN_10_EXP__=(-37)", + "__FLT64_MIN__=2.2250738585072014e-308F64", + "__INT_LEAST32_WIDTH__=32", + "__INTMAX_TYPE__=long long int", + "__DEC128_MAX_EXP__=6145", + "__FLT32X_HAS_QUIET_NAN__=1", + "__ATOMIC_CONSUME=1", + "__GNUC_MINOR__=4", + "__INT_FAST16_WIDTH__=32", + "__UINTMAX_MAX__=0xffffffffffffffffULL", + "__DEC32_MANT_DIG__=7", + "__FLT32X_DENORM_MIN__=4.9406564584124654e-324F32x", + "__DBL_MAX_10_EXP__=308", + "__LDBL_DENORM_MIN__=4.9406564584124654e-324L", + "__INT16_C(c)=c", + "__cpp_generic_lambdas=201304", + "__STDC__=1", + "__FLT32X_DIG__=15", + "__PTRDIFF_TYPE__=int", + "__ATOMIC_SEQ_CST=5", + "__UINT32_TYPE__=unsigned int", + "__FLT32X_MIN_10_EXP__=(-307)", + "__UINTPTR_TYPE__=unsigned int", + "__DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD", + "__DEC128_MANT_DIG__=34", + "__LDBL_MIN_10_EXP__=(-307)", + "__SIZEOF_LONG_LONG__=8", + "__cpp_user_defined_literals=200809", + "__GCC_ATOMIC_LLONG_LOCK_FREE=1", + "__FLT32X_MIN__=2.2250738585072014e-308F32x", + "__LDBL_DIG__=15", + "__FLT_DECIMAL_DIG__=9", + "__UINT_FAST16_MAX__=0xffffffffU", + "__GCC_ATOMIC_SHORT_LOCK_FREE=2", + "__INT_LEAST64_WIDTH__=64", + "__UINT_FAST8_TYPE__=unsigned int", + "__cpp_init_captures=201304", + "__ATOMIC_ACQ_REL=4", + "__ATOMIC_RELEASE=3", + "USBCON" + ] + } + ] +} \ No newline at end of file diff --git a/esp32UI/UI/.vscode/extensions.json b/esp32UI/UI/.vscode/extensions.json new file mode 100644 index 0000000..2d7a929 --- /dev/null +++ b/esp32UI/UI/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "wokwi.wokwi-vscode" + ] +} \ No newline at end of file diff --git a/esp32UI/UI/.vscode/launch.json b/esp32UI/UI/.vscode/launch.json new file mode 100644 index 0000000..34e19a0 --- /dev/null +++ b/esp32UI/UI/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "cppdbg", + "request": "launch", + "args": [], + "stopAtEntry": false, + "externalConsole": true, + "cwd": "c:/Users/Fxue/Desktop/Arduino/esp32UI/UI", + "program": "c:/Users/Fxue/Desktop/Arduino/esp32UI/UI/build/Debug/outDebug", + "MIMode": "gdb", + "miDebuggerPath": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/esp32UI/UI/.vscode/settings.json b/esp32UI/UI/.vscode/settings.json new file mode 100644 index 0000000..4dd824d --- /dev/null +++ b/esp32UI/UI/.vscode/settings.json @@ -0,0 +1,58 @@ +{ + "C_Cpp_Runner.cCompilerPath": "gcc", + "C_Cpp_Runner.cppCompilerPath": "g++", + "C_Cpp_Runner.debuggerPath": "gdb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false +} \ No newline at end of file diff --git a/esp32UI/UI/.vscode/tasks.json b/esp32UI/UI/.vscode/tasks.json new file mode 100644 index 0000000..b51f6ce --- /dev/null +++ b/esp32UI/UI/.vscode/tasks.json @@ -0,0 +1,78 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "haas-studio: Config", + "type": "shell", + "command": "aos", + "args": [ + "make", + "@haaseduk1", + "-c", + "config" + ], + "presentation": { + "focus": true + } + }, + { + "label": "haas-studio: Make", + "type": "shell", + "command": "aos", + "args": [ + "make" + ], + "presentation": { + "focus": true + } + }, + { + "label": "haas-studio: Burn", + "type": "shell", + "command": "aos", + "args": [ + "burn" + ], + "presentation": { + "focus": true + } + }, + { + "label": "haas-studio: Serial Monitor", + "type": "shell", + "command": "aos", + "args": [ + "monitor", + "", + "1500000" + ], + "presentation": { + "focus": true, + "panel": "dedicated" + } + }, + { + "label": "haas-studio: Clean", + "type": "shell", + "command": "aos", + "args": [ + "make", + "clean" + ], + "presentation": { + "focus": true + } + }, + { + "label": "dummy_aos3.3.0", + "command": "pwd" + } + ], + "windows": { + "options": { + "env": { + "PATH": "C:\\ProgramData\\aos\\miniconda3;C:\\ProgramData\\aos\\miniconda3\\Scripts;C:\\ProgramData\\aos\\miniconda3\\Library\\bin;${env:PATH}" + } + } + } +} diff --git a/esp32UI/UI/UI.ino b/esp32UI/UI/UI.ino new file mode 100644 index 0000000..503142e --- /dev/null +++ b/esp32UI/UI/UI.ino @@ -0,0 +1,1308 @@ +//#include +#include +#include +#include +#include +// #define ESP32 0 +// #define MEGA2560 1 + +// #define MCU 1 + +#define SPEED 4//16的因数 +#define ICON_SPEED 12 +#define ICON_SPACE 48//图标间隔,speed倍数 + + // #define READ A0 + // #define BTN0 5 + // #define BTN1 6 + // #define BTN2 7 +#define READ 2 +#define BTN0 27 //上 +#define BTN1 25 //下 +#define BTN2 26 //确认 + +const char* ssid = "WFxue"; +const char* password = "xue3344520"; +char date[20]; +char time_n[20]; +const char *ntpServer = "ntp.aliyun.com"; +const long gmtOffset_sec = 8*3600; +const int daylightOffset_sec = 0; + +U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* clock=*/ 22, /* data=*/ 21); // ESP32 Thing, pure SW emulated I2C + +PROGMEM const uint8_t icon_pic[][200] +{ + + { + 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00, + 0x00,0x02,0x04,0x00,0x00,0x00,0x03,0x0C, + 0x00,0x00,0x80,0x03,0x1C,0x00,0x07,0xC0, + 0x03,0x7C,0x80,0x1F,0xE0,0x03,0xFE,0xFF, + 0xFF,0xFF,0x03,0xFE,0xFF,0xFF,0xFF,0x03, + 0xFE,0xFF,0xFF,0xFF,0x03,0xFE,0xFF,0xFF, + 0xFF,0x03,0xFE,0xFF,0xFF,0xFF,0x03,0xFE, + 0xFF,0xFF,0xFF,0x03,0xFC,0xFF,0xFF,0xFF, + 0x03,0xFC,0xFF,0xFF,0xFF,0x03,0xFC,0xFF, + 0xFF,0xFF,0x03,0xFC,0xFF,0xFF,0xFF,0x03, + 0xFC,0xFF,0xFF,0xFF,0x01,0xFC,0xFF,0xFF, + 0xFF,0x01,0xF8,0xFF,0xFF,0xFF,0x01,0xF8, + 0xFF,0xFF,0xFF,0x01,0xF8,0xFF,0xFF,0xFF, + 0x00,0xF0,0xFF,0xFF,0xFF,0x00,0xF0,0xFF, + 0xFF,0x7F,0x00,0xE0,0xFF,0xFF,0x7F,0x00, + 0xE0,0xFF,0xFF,0x3F,0x00,0xC0,0xFF,0xFF, + 0x3F,0x00,0x80,0xFF,0xFF,0x1F,0x00,0x80, + 0xFF,0xFF,0x0F,0x00,0x00,0xFF,0xFF,0x07, + 0x00,0x00,0xFE,0xFF,0x03,0x00,0x00,0xF8, + 0xFF,0x01,0x00,0x00,0xF0,0x7F,0x00,0x00, + 0x00,0xC0,0x1F,0x00,0x00,0x00,0x00,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00 /*"C:\Users\ROG\Desktop\三连\点赞.bmp",0*//* (36 X 35 )*/ + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, + 0x00, 0x1F, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, + 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0xC0, + 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, + 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xE0, 0xFF, + 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x00, + 0xFC, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, + 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, + 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0xFF, 0x07, + 0xFC, 0xFF, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, + 0xFF, 0x01, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, + 0xFF, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, + 0x00, 0x80, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFF, + 0xFF, 0x1F, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, + 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0xFF, + 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0x00, + 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0x0F, + 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0xFF, + 0xFF, 0x1F, 0x00, 0x80, 0xFF, 0xF0, 0x1F, 0x00, + 0x80, 0x3F, 0xC0, 0x1F, 0x00, 0x80, 0x1F, 0x00, + 0x1F, 0x00, 0x00, 0x07, 0x00, 0x1C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00/*"C:\Users\ROG\Desktop\三连\收藏.bmp",0*/ + /* (36 X 37 )*/ + }, + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18, + 0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x00, + 0x04,0x3E,0x00,0x00,0x00,0x1E,0x3E,0x0E, + 0x00,0x00,0x3E,0x3E,0x0F,0x00,0x00,0x7E, + 0xBF,0x0F,0x00,0x00,0x7E,0xFF,0x0F,0x00, + 0x00,0xFE,0xFF,0x0F,0x00,0xF0,0xFF,0xFF, + 0x0F,0x00,0xF8,0xFF,0xFF,0xFF,0x01,0xF0, + 0xFF,0xFF,0xFF,0x01,0xF0,0xFF,0xFF,0xFF, + 0x01,0xE0,0xFF,0xFF,0xFF,0x00,0xC0,0xFF, + 0xF0,0x7F,0x00,0xF0,0x7F,0xE0,0x3F,0x00, + 0xFC,0x3F,0xC0,0xFF,0x00,0xFE,0x3F,0xC0, + 0xFF,0x03,0xFC,0x3F,0xC0,0xFF,0x07,0xF8, + 0x7F,0xE0,0xFF,0x07,0xE0,0x7F,0xE0,0xFF, + 0x01,0xC0,0xFF,0xF9,0x7F,0x00,0xE0,0xFF, + 0xFF,0x3F,0x00,0xF0,0xFF,0xFF,0x7F,0x00, + 0xF0,0xFF,0xFF,0xFF,0x00,0xF8,0xFF,0xFF, + 0xFF,0x00,0xF0,0xFE,0xFF,0xFF,0x00,0x00, + 0xFE,0xFF,0x63,0x00,0x00,0xFE,0xFF,0x03, + 0x00,0x00,0xBE,0xEF,0x07,0x00,0x00,0x9E, + 0xCF,0x07,0x00,0x00,0x8E,0x8F,0x03,0x00, + 0x00,0x80,0x0F,0x03,0x00,0x00,0x00,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00 /*"C:\Users\ROG\Desktop\三连\点赞.bmp",0*//* (36 X 35 )*/ + }, + { + 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x3E, + 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, + 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, + 0x7F, 0x00, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, + 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0xC0, 0x7F, + 0x00, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x00, + 0xF8, 0x7F, 0x00, 0x00, 0xF0, 0xF8, 0xFF, 0xFF, + 0x01, 0xFC, 0xF8, 0xFF, 0xFF, 0x07, 0xFC, 0xF8, + 0xFF, 0xFF, 0x07, 0xFE, 0xF8, 0xFF, 0xFF, 0x07, + 0xFE, 0xF8, 0xFF, 0xFF, 0x07, 0xFE, 0xF8, 0xFF, + 0xFF, 0x07, 0xFE, 0xF8, 0xFF, 0xFF, 0x07, 0xFE, + 0xF8, 0xFF, 0xFF, 0x07, 0xFE, 0xF8, 0xFF, 0xFF, + 0x03, 0xFE, 0xF8, 0xFF, 0xFF, 0x03, 0xFE, 0xF8, + 0xFF, 0xFF, 0x03, 0xFE, 0xF8, 0xFF, 0xFF, 0x03, + 0xFE, 0xF8, 0xFF, 0xFF, 0x01, 0xFE, 0xF8, 0xFF, + 0xFF, 0x01, 0xFE, 0xF8, 0xFF, 0xFF, 0x01, 0xFE, + 0xF8, 0xFF, 0xFF, 0x01, 0xFE, 0xF8, 0xFF, 0xFF, + 0x00, 0xFE, 0xF8, 0xFF, 0xFF, 0x00, 0xFC, 0xF8, + 0xFF, 0x7F, 0x00, 0xFC, 0xF8, 0xFF, 0x3F, 0x00, + 0xF8, 0xF8, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /*"C:\Users\ROG\Desktop\三连\点赞.bmp",0*/ + /* (36 X 35 )*/ + }, + { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x0C,0x00,0x00,0x00,0x00,0x1C,0x00, + 0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00, + 0xFC,0x00,0x00,0x00,0x00,0xFC,0x01,0x00, + 0x00,0x00,0xFC,0x03,0x00,0x00,0x00,0xFC, + 0x07,0x00,0x00,0x00,0xFC,0x0F,0x00,0x00, + 0x00,0xFE,0x1F,0x00,0x00,0xF8,0xFF,0x3F, + 0x00,0x00,0xFF,0xFF,0xFF,0x00,0xC0,0xFF, + 0xFF,0xFF,0x01,0xE0,0xFF,0xFF,0xFF,0x03, + 0xF0,0xFF,0xFF,0xFF,0x07,0xF0,0xFF,0xFF, + 0xFF,0x0F,0xF8,0xFF,0xFF,0xFF,0x0F,0xFC, + 0xFF,0xFF,0xFF,0x07,0xFC,0xFF,0xFF,0xFF, + 0x03,0xFE,0xFF,0xFF,0xFF,0x01,0xFE,0xFF, + 0xFF,0xFF,0x00,0xFF,0x03,0xFE,0x3F,0x00, + 0xFF,0x00,0xFC,0x1F,0x00,0x3F,0x00,0xFC, + 0x0F,0x00,0x1F,0x00,0xFC,0x07,0x00,0x07, + 0x00,0xFC,0x03,0x00,0x03,0x00,0xFC,0x01, + 0x00,0x01,0x00,0xFC,0x00,0x00,0x00,0x00, + 0x3C,0x00,0x00,0x00,0x00,0x1C,0x00,0x00, + 0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,/*"C:\Users\13944\Desktop\fenxiang.bmp",0*/ + } +}; + +uint8_t icon_width[]={35,37,36,36,36}; + +//main界面图片 +PROGMEM const uint8_t LOGO[]= +{ +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F, +0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xE7,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0x0F,0xFE,0x99,0xFF,0xE4,0x1F,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xE7,0xFD,0xBD,0xFF,0xDE,0xDF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0x1F,0xFE, +0xF7,0xFD,0x7D,0x7F,0xDF,0xDF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFD, +0xF7,0xFD,0x7D,0x7F,0xDF,0xDF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFD, +0xF7,0xFD,0x7D,0x7F,0xDF,0x1F,0xF0,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFD, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0xFF,0x1F,0xFE,0xFF,0x83,0xFF,0xE3,0xF1, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0xFF,0xE3,0xF1,0xFF,0x7C,0xF8,0xF9,0xEF, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0xFF,0xFD,0xEF,0x3F,0xFF,0xF3,0xFD,0xDF, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0xFF,0x1E,0xDC,0xBF,0x03,0xF7,0xE3,0xE1, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0x7F,0xEF,0xB9,0xDF,0xFB,0xF0,0xEF,0xFD, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0x7F,0xE7,0xBB,0xDF,0xF3,0xFF,0xEF,0xFD, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0xBF,0xF7,0x7B,0xDF,0x0F,0xFF,0xEF,0xFD, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0xBF,0x0F,0x7C,0xBF,0xFF,0xFC,0xEF,0xFD, +0xF7,0xFD,0x7D,0x7F,0xDF,0xFF,0xF7,0xFD,0xBF,0xFF,0xBF,0x7F,0xFE,0xF3,0xEF,0xFD, +0xF7,0xFD,0xBE,0x7F,0xDF,0xFF,0xF7,0xFD,0xBF,0x07,0xC0,0xFF,0xE1,0xF7,0xEF,0xFD, +0xEF,0xFB,0xBE,0x7F,0xDF,0xFF,0xF7,0xFD,0xBF,0xEF,0xFF,0xFF,0x9F,0xEF,0xEF,0xFD, +0xEF,0x07,0xBF,0x7F,0xDF,0xFF,0xF7,0xFD,0x7F,0xEF,0xC7,0x3F,0x3E,0xEF,0xEF,0xFD, +0xDF,0xFF,0xDF,0x7F,0xDF,0xFF,0xF7,0xFD,0xFF,0x1E,0xB8,0xDF,0xB9,0xF7,0xEF,0xE3, +0x9F,0xFF,0xEF,0x7F,0xDF,0xFF,0xF7,0xFD,0xFF,0xFC,0xBF,0x9F,0xC7,0xF7,0xDF,0xCF, +0x7F,0xFF,0xF3,0xFF,0xDE,0xFF,0xEF,0xFD,0xFF,0xFB,0xCF,0x3F,0xFF,0xF9,0x9F,0xEF, +0xFF,0x00,0xFC,0xFF,0xE1,0xFF,0x1F,0xFE,0xFF,0x07,0xF0,0xFF,0x00,0xFE,0x7F,0xF0, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F, +0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x08,0x08,0x00,0x40,0x00,0x02,0x10,0x00,0x00, +0x00,0x00,0x88,0x00,0x00,0x00,0x00,0x08,0x08,0x00,0x60,0x00,0x02,0x00,0x00,0x00, +0x00,0x00,0x88,0x9C,0x24,0xC7,0x1C,0x0F,0x68,0x22,0xA0,0xCC,0x23,0x91,0xC7,0x01, +0x00,0xFE,0x88,0xA2,0xAA,0x48,0xA2,0x08,0x98,0x14,0xB0,0x24,0x22,0x91,0x24,0x02, +0x00,0x00,0x78,0xA2,0xAB,0x4F,0xBE,0x08,0x88,0x14,0xF0,0x24,0x22,0x91,0x24,0x02, +0x00,0x00,0x08,0x22,0x9B,0x40,0x82,0x08,0x88,0x0C,0x08,0x25,0x22,0x91,0x24,0x02, +0x00,0x00,0x08,0x1C,0x11,0x4F,0x3C,0x0F,0x78,0x08,0x08,0xC5,0xE3,0x91,0xC4,0x01, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 +}; + +const float PID_MAX=10.00;//PID最大允许值 +//PID变量 +float Kpid[3]={9.97,0.2,0.01};//Kp,Ki,Kd +// float Kp=8.96; +// float Ki=0.2; +// float Kd=0.01; + + +uint8_t disappear_step=1; + + +float angle,angle_last; +//实时坐标 +uint8_t chart_x; +bool frame_is_drawed=false; + +//指向buf首地址的指针 +uint8_t* buf_ptr; +uint16_t buf_len; + +//选择界面变量 +uint8_t x; +int16_t y,y_trg;//目标和当前 +uint8_t line_y,line_y_trg;//线的位置 +uint8_t box_width,box_width_trg;//框的宽度 +int16_t box_y,box_y_trg;//框的当前值和目标值 +int8_t ui_select;//当前选中那一栏 + +//pid界面变量 +//int8_t pid_y,pid_y_trg; +uint8_t pid_line_y,pid_line_y_trg;//线的位置 +uint8_t pid_box_width,pid_box_width_trg;//框的宽度 +int16_t pid_box_y,pid_box_y_trg;//框的当前值和目标值 +int8_t pid_select;//当前选中那一栏 + +//icon界面变量 +int16_t icon_x,icon_x_trg; +int16_t app_y,app_y_trg; + +int8_t icon_select; + +uint8_t ui_index,ui_state; + + +enum//ui_index +{ + M_LOGO,//开始界面 + M_SELECT,//选择界面 + M_PID,//PID界面 + M_PID_EDIT,//pid编辑 + M_ICON,//icon界面 + M_CHART,//图表 + M_TEXT_EDIT,//文字编辑 + M_VIDEO,//视频显示 + M_ABOUT,//关于本机 +}; + + +enum//ui_state +{ + S_NONE, + S_DISAPPEAR, + S_SWITCH, + S_MENU_TO_MENU, + S_MENU_TO_PIC, + S_PIC_TO_MENU, +}; + +//const char* text="This is a text Hello world ! follow up one two three four may jun july"; + +//菜单结构体 +typedef struct +{ + char * select; +}SELECT_LIST; + +SELECT_LIST pid[] +{ + {"-Proportion"}, + {"-Integral"}, + {"-Derivative"}, + {"Return"}, +}; + +uint8_t pid_num=sizeof(pid)/sizeof(SELECT_LIST);//PID选项数量 + +SELECT_LIST list[] +{ + {"MainUI"}, + {"+PID Editor"}, + {"-Icon Test"}, + {"-Chart Test"}, + {"-Text Edit"}, + {"-Play Video"}, + {"{ About }"}, +}; + +uint8_t list_num=sizeof(list)/sizeof(SELECT_LIST);//选择界面数量 +uint8_t single_line_length=63/list_num; +uint8_t total_line_length=single_line_length*list_num+1; + +SELECT_LIST icon[] +{ + {"Likes"}, + {"Collection"}, + {"Setp"}, + {"Slot"}, + {"Share"}, +}; + +//设备名称 +char name[]="MunoUI"; +//允许名字的最大长度 +const uint8_t name_len=6;//0-11for name 12 for return +uint8_t edit_index=0; +bool edit_flag=false;//默认不在编辑 +uint8_t blink_flag;//默认高亮 +const uint8_t BLINK_SPEED=16;//2的倍数 + +uint8_t icon_num=sizeof(icon)/sizeof(SELECT_LIST); + +//按键变量 +typedef struct +{ + bool val; + bool last_val; +}KEY; + +KEY key[3]={false}; + +//按键信息 +typedef struct +{ +uint8_t id; +bool pressed; +}KEY_MSG; + +KEY_MSG key_msg={0}; + +bool get_key_val(uint8_t ch) +{ + switch (ch) + { + case 0: + return digitalRead(BTN0); + break; + case 1: + return digitalRead(BTN1); + break; + case 2: + return digitalRead(BTN2); + break; + default: + break; + } +} + +void key_init() +{ + for(uint8_t i=0;i<(sizeof(key)/sizeof(KEY));++i) + { + key[i].val=key[i].last_val=get_key_val(i); + } +} + +void key_scan() +{ + for(uint8_t i=0;i<(sizeof(key)/sizeof(KEY));++i) + { + key[i].val=get_key_val(i);//获取键值 + if(key[i].last_val!=key[i].val)//发生改变 + { + key[i].last_val=key[i].val;//更新状态 + if(key[i].val==LOW) + { + key_msg.id=i; + key_msg.pressed=true; + } + } + } +} + +//移动函数 +bool move(int16_t* a,int16_t* a_trg) +{ + if (*a < *a_trg) + { + *a+=SPEED; + if (*a>*a_trg) *a=*a_trg;//加完超过 + } + else if(*a>*a_trg) + { + *a-=SPEED; + if (*a<*a_trg) *a=*a_trg;//减完不足 + } + else + { + return true;//到达目标 + } + return false;//未到达 +} + +//移动函数 +bool move_icon(int16_t* a,int16_t* a_trg) +{ + if (*a < *a_trg) + { + *a+=ICON_SPEED; + if (*a>*a_trg) *a=*a_trg;//加完超过 + } + else if(*a>*a_trg) + { + *a-=ICON_SPEED; + if (*a<*a_trg) *a=*a_trg;//减完不足 + } + else + { + return true;//到达目标 + } + return false;//未到达 +} + +//宽度移动函数 +bool move_width(uint8_t* a,uint8_t* a_trg,uint8_t select,uint8_t id) +{ + if (*a < *a_trg) + { + uint8_t step=16/SPEED;//判断步数 + uint8_t len; + if(ui_index==M_SELECT) + { + len=abs(u8g2.getStrWidth(list[select].select)-u8g2.getStrWidth(list[id==0?select+1:select-1].select)); + } + else if(ui_index==M_PID) + { + len=abs(u8g2.getStrWidth(pid[select].select)-u8g2.getStrWidth(pid[id==0?select+1:select-1].select)); + } + uint8_t width_speed=((len%step)==0?(len/step):(len/step+1)); //计算步长 + *a+=width_speed; + if (*a>*a_trg) *a=*a_trg;// + } + else if(*a>*a_trg) + { + uint8_t step=16/SPEED;//判断步数 + uint8_t len; + if(ui_index==M_SELECT) + { + len=abs(u8g2.getStrWidth(list[select].select)-u8g2.getStrWidth(list[id==0?select+1:select-1].select)); + } + else if(ui_index==M_PID) + { + len=abs(u8g2.getStrWidth(pid[select].select)-u8g2.getStrWidth(pid[id==0?select+1:select-1].select)); + } + uint8_t width_speed=((len%step)==0?(len/step):(len/step+1)); //计算步长 + *a-=width_speed; + if (*a<*a_trg) *a=*a_trg; + } + else + { + return true;//到达目标 + } + return false;//未到达 +} + +//进度条移动函数 +bool move_bar(uint8_t* a,uint8_t* a_trg) +{ + if (*a < *a_trg) + { + uint8_t step=16/SPEED;//判断步数 + uint8_t width_speed=((single_line_length%step)==0?(single_line_length/step):(single_line_length/step+1)); //计算步长 + *a+=width_speed; + if (*a>*a_trg) *a=*a_trg;// + } + else if(*a>*a_trg) + { + uint8_t step=16/SPEED;//判断步数 + uint8_t width_speed=((single_line_length%step)==0?(single_line_length/step):(single_line_length/step+1)); //计算步长 + *a-=width_speed; + if (*a<*a_trg) *a=*a_trg; + } + else + { + return true;//到达目标 + } + return false;//未到达 +} + +//文字编辑函数 +void text_edit(bool dir,uint8_t index) +{ + if(!dir) + { + if(name[index]>='A' && name[index]<='Z')//大写字母 + { + if(name[index]=='A') + { + name[index]='z'; + } + else + { + name[index]-=1; + } + } + else if(name[index]>='a' && name[index]<='z')//小写字母 + { + if(name[index]=='a') + { + name[index]=' '; + } + else + { + name[index]-=1; + } + } + else + { + name[index]='Z'; + } + } + else + { + if(name[index]>='A' && name[index]<='Z')//大写字母 + { + if(name[index]=='Z') + { + name[index]=' '; + } + else + { + name[index]+=1; + } + } + else if(name[index]>='a' && name[index]<='z')//小写字母 + { + if(name[index]=='z') + { + name[index]='A'; + } + else + { + name[index]+=1; + } + } + else + { + name[index]='a'; + } + } +} + +//消失函数 +void disappear() +{ + switch(disappear_step) + { + case 1: + for(uint16_t i=0;i0) Kpid[pid_select]-=0.01; + break; + case 1: + if(Kpid[pid_select]< PID_MAX ) Kpid[pid_select]+=0.01; + break; + case 2: + ui_index=M_PID; + break; + default: + break; + } + } + pid_ui_show(); + for(uint16_t i=0;i(sizeof(list)/sizeof(SELECT_LIST))) break; + ui_select+=1; + line_y_trg+=single_line_length; + if((ui_select+1)>(4-y/16)) + { + y_trg-=16; + } + else + { + box_y_trg+=16; + } + + break; + case 2: + switch(ui_select) + { + case 0: //return + ui_state=S_DISAPPEAR; + ui_index=M_LOGO; + break; + case 1: //pid + ui_state=S_DISAPPEAR; + ui_index=M_PID; + break; + case 2: //icon + ui_state=S_DISAPPEAR; + ui_index=M_ICON; + break; + case 3: //chart + ui_state=S_DISAPPEAR; + ui_index=M_CHART; + break; + case 4: //textedit + ui_state=S_DISAPPEAR; + ui_index=M_TEXT_EDIT; + break; + case 6: //about + ui_state=S_DISAPPEAR; + ui_index=M_ABOUT; + break; + default: + break; + } + //Serial.println("Btn2"); + default: + break; + } + //Serial.println(ui_select); + box_width_trg=u8g2.getStrWidth(list[ui_select].select)+x*2; + } + select_ui_show(); +} + +void icon_proc(void)//icon界面处理 +{ + icon_ui_show(); + if(key_msg.pressed) + { + key_msg.pressed=false; + switch(key_msg.id) + { + case 1: + if(icon_select!=(icon_num-1)) + { + icon_select+=1; + app_y_trg+=16; + icon_x_trg-=ICON_SPACE; + } + break; + case 0: + if(icon_select!=0) + { + icon_select-=1; + app_y_trg-=16; + icon_x_trg+=ICON_SPACE; + } + break; + case 2: + ui_state=S_DISAPPEAR; + ui_index=M_SELECT; + icon_select=0; + icon_x=icon_x_trg=0; + app_y=app_y_trg=0; + break; + default: + break; + } + } +} + +void chart_proc()//chart界面处理函数 +{ + chart_ui_show(); + if(key_msg.pressed) + { + key_msg.pressed=false; + ui_state=S_DISAPPEAR; + ui_index=M_SELECT; + frame_is_drawed=false;//退出后框架为未画状态 + chart_x=0; + } +} + +void text_edit_proc() +{ + text_edit_ui_show(); + if(key_msg.pressed) + { + key_msg.pressed=false; + switch(key_msg.id) + { + case 0: + if(edit_flag) + { + //编辑 + text_edit(false,edit_index); + } + else + { + if(edit_index==0) + { + edit_index=name_len; + } + else + { + edit_index-=1; + } + } + break; + case 1: + if(edit_flag) + { + //编辑 + text_edit(true,edit_index); + } + else + { + if(edit_index==name_len) + { + edit_index=0; + } + else + { + edit_index+=1; + } + } + break; + case 2: + if (edit_index==name_len) + { + ui_state=S_DISAPPEAR; + ui_index=M_SELECT; + edit_index=0; + } + else + { + edit_flag=!edit_flag; + } + break; + default: + break; + } + } +} + +void about_proc()//about界面处理函数 +{ + if(key_msg.pressed) + { + key_msg.pressed=false; + ui_state=S_DISAPPEAR; + ui_index=M_SELECT; + } + about_ui_show(); +} +/********************************总的UI显示************************************/ + +void ui_proc()//总的UI进程 +{ + switch(ui_state) + { + case S_NONE: + if(ui_index!=M_CHART) u8g2.clearBuffer(); + switch(ui_index) + { + case M_LOGO: + logo_proc(); + break; + case M_SELECT: + select_proc(); + break; + case M_PID: + pid_proc(); + break; + case M_ICON: + icon_proc(); + break; + case M_CHART: + chart_proc(); + break; + case M_TEXT_EDIT: + text_edit_proc(); + break; + case M_PID_EDIT: + pid_edit_proc(); + break; + case M_ABOUT: + about_proc(); + break; + default: + break; + } + break; + case S_DISAPPEAR: + disappear(); + break; + default: + break; + } + u8g2.sendBuffer(); +} + + +void conn() +{ + WiFi.disconnect(true); // 断开当前WIFI连接 + WiFi.mode(WIFI_STA); // 设置WIFI模式为STA模式 + WiFi.begin(ssid, password); +/* while (WiFi.status() != WL_CONNECTED) { + delay(1000); + Serial.println("Connecting..."); + } +*/ +} + +void ntc_now() +{ + static uint32_t nowTime = millis(); + if (millis() - nowTime > 1000) + { + nowTime = millis(); + time_t now = time(nullptr); + struct tm* timeinfo = localtime(&now); + + strftime(date, sizeof(date), "%Y-%m-%d", timeinfo); + strftime(time_n, sizeof(time_n), "%H:%M:%S", timeinfo); +// u8g2.drawStr(2,12,"2023-06-25"); +// u8g2.drawStr(83,12,"17:10:20"); +// u8g2.sendBuffer(); + } +} +void wifi_ac() +{ + static uint32_t wifi_nowTime = millis(); + if (millis() - wifi_nowTime > 20000) + { + wifi_nowTime = millis(); + if (WiFi.status() != WL_CONNECTED) + { + conn(); + Serial.println("Connecting..."); + } + else + { + Serial.println("Connected to Wi-Fi"); + } + } +} + +void setup() { + Serial.begin(115200); + //Wire.begin(21,22,400000); + pinMode(BTN0, INPUT_PULLUP); + pinMode(BTN1, INPUT_PULLUP); + pinMode(BTN2, INPUT_PULLUP); + pinMode(32, OUTPUT); + pinMode(18, OUTPUT); + digitalWrite(18,HIGH); + digitalWrite(32,LOW); + key_init(); + u8g2.setBusClock(800000); + u8g2.begin(); + u8g2.setFont(u8g2_font_wqy12_t_chinese1); + conn(); + + configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); +// configTime(0, 0, "pool.ntp.org"); + while (!time(nullptr)) { + delay(1000); + Serial.println("Waiting..."); + } + Serial.println("Time synchronized"); + //u8g2.setContrast(10); + + buf_ptr=u8g2.getBufferPtr();//拿到buffer首地址 + buf_len=8*u8g2.getBufferTileHeight()*u8g2.getBufferTileWidth(); + + x=4; + y=y_trg=0; + line_y=line_y_trg=1; + pid_line_y=pid_line_y_trg=1; + ui_select=pid_select=icon_select=0; + icon_x=icon_x_trg=0; + app_y=app_y_trg=0; + + box_width=box_width_trg=u8g2.getStrWidth(list[ui_select].select)+x*2;//两边各多2 + pid_box_width=pid_box_width_trg=u8g2.getStrWidth(pid[pid_select].select)+x*2;//两边各多2 + + ui_index=M_LOGO; + //ui_index=M_TEXT_EDIT; + ui_state=S_NONE; +} + +void loop() { + ntc_now(); //NTP同步时间 + key_scan(); //按键检测 + ui_proc(); //UI进程 + wifi_ac(); //wifi检测 +} \ No newline at end of file diff --git a/esp32UI/UI/新建文本文档 (2).txt b/esp32UI/UI/新建文本文档 (2).txt new file mode 100644 index 0000000..5cb8a26 --- /dev/null +++ b/esp32UI/UI/新建文本文档 (2).txt @@ -0,0 +1,80 @@ +ʹESP32U8g2OLEDʾںʱʾ룺 + +```c++ +#include +#include +#include + +// Replace with your network credentials +const char* ssid = "your_SSID"; +const char* password = "your_PASSWORD"; + +// Define OLED pins +#define OLED_SDA 21 +#define OLED_SCL 22 +#define OLED_RST 16 + +// Define OLED object +U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, OLED_SCL, OLED_SDA, OLED_RST); + +void setup() { + // Start serial communication + Serial.begin(115200); + + // Connect to Wi-Fi network + WiFi.begin(ssid, password); + Serial.println("Connecting to Wi-Fi"); + + while (WiFi.status() != WL_CONNECTED) { + delay(1000); + Serial.println("Connecting..."); + } + + Serial.println("Connected to Wi-Fi"); + + // Initialize time + configTime(0, 0, "pool.ntp.org"); + Serial.println("Waiting for time"); + + while (!time(nullptr)) { + delay(1000); + Serial.println("Waiting..."); + } + + Serial.println("Time synchronized"); + + // Initialize OLED display + u8g2.begin(); + u8g2.setFont(u8g2_font_ncenB08_tr); +} + +void loop() { + // Get current time + time_t now = time(nullptr); + struct tm* timeinfo = localtime(&now); + + // Format date and time + char date[20]; + strftime(date, sizeof(date), "%Y-%m-%d", timeinfo); + + char time[20]; + strftime(time, sizeof(time), "%H:%M:%S", timeinfo); + + // Clear OLED display + u8g2.clearBuffer(); + + // Display date and time + u8g2.setCursor(0, 20); + u8g2.print(date); + u8g2.setCursor(0, 40); + u8g2.print(time); + + // Send display buffer to OLED + u8g2.sendBuffer(); + + // Wait for 1 second + delay(1000); +} +``` + +ڴʾУӵWi-Fi磬ȻʹNTPͬʱ䡣ȻdzʼOLEDʾѭлȡǰʱ䲢ʽΪںʱ䡣OLEDʾںʱ䣬ȴ1ӡ \ No newline at end of file