Posts

Showing posts from December, 2022

如何解決 ESPAsyncWebServer 錯誤 - undefined reference to `mbedtls_md5_starts' (Solving ESPAsyncWebServer - undefined reference to `mbedtls_md5_starts issues )

Image
最近在使用 ESPAsyncWebServer 時, 發生了一個編譯的錯誤: c:/users/stone/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: d:\stone\Documents\build\libraries\ESPAsyncWebServer-master\WebAuthentication.cpp.o:(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts' 看來是 ESPAsyncWebServer 的問題, 於是我到 Git Hub 找到了 ESPAsyncWebServer https://github.com/me-no-dev/ESPAsyncWebServer 從新下載, 更新了 Library 還是沒有辦法, 錯誤依然存在, 無法解決.  經過了3個小時反覆搜尋, 發現這是 ESPAsyncWebServer 的一個 issue, 目前還沒有被修正.  不過, 在底下有高手提出了解決方法: 找到 WebAuthentication.cpp 然在大約 72 行左右,  modify in the library directory your_directory/Arduino/libraries/ESPAsyncWebServer-master/src/WebAuthentication.cpp  @line 72 with this (the comment are the old line ......) 只要把原來的後3行紅色註解掉(//), 加上4個藍色新程式碼, 即可以修正! #ifdef ESP32 mbedtls_md5_init(&_ctx); mbedtls_md5_update_ret (&_ctx,data,len); mbedtls_md5_finish_ret(&_ctx,data); mbe

App Inventor #11自己來寫 App - 骰子遊戲 (Dice Game)

Image
大家好, 歡迎收看本週的Weekend project with Stonez56。  本周要進行的是 App Inventor 第10集 -  自己來寫 App - 骰子遊戲 這個影片適合稍進階同學來觀看&學習, 想要越級挑戰的朋也也歡迎拿來這個單元來學習 App Inventor 2!  這是一個學習任意組件的好範例, Android, iPad 都可以使用! 本次教學你可以學到:  * 本集會使用到:  * 感測器 (Sensor)  * 變數應用 (Variables)  * 清單的應用 (List)  * 圖片的應用 (Image)  * 為APP加上音音效 (Audio)  * 亂數的應用 (Randomized)  * 用任意組件 (Any component)  * 程序的應用 (Procedure) 參考資料:  App inventor 語法 & 使用方式: http://ai2.appinventor.mit.edu/reference/blocks/  音效來源: https://pixabay.com/  圖片製作:  https://figma.com  如果你時間不夠, 也可以從以下的時間軸挑選想看的部份即可!  影片時間軸:  00:00 開始 00:24 骰子 App 示範 01:20 App 畫面的配置 / 素材上傳 04:39 App 程式設計 05:18 如何使用變數/變數種子 06:31 設定音效 11:54 如何使用任意元件 15:22 使用任意組件來移除重複的運算 16:26 把骰子元件放入清單中 23:11 使用任意組件 vs 未使用任意組件 App Inventor 相關教學影片: * App Inventor #11自己來寫 App - 骰子遊戲 (Dice Game) https://youtu.be/2d6Si6u8FVE * App Inventor #10 集 自己來寫 APP YouBike 2.0 (下).  https://youtu.be/Cli-_lUPjgU * App Inventor #9 集 - 自己來寫 APP YouBike 2.0 (上)  https://youtu.be/D78-eDRFiXM *App Inventor #8 AI2 Companion 一直斷線