Try   HackMD
tags: FlagsBlock

Flag's Block 下載與安裝說明

Windows 版本

下載與安裝

  1. 進入 Flag's Block 下載頁面下載 FlagsBlock_vXXX.exe(XXX 為版本編號) 安裝程式, 下載後請直接執行, 會看到以下畫面:

    若進入下載頁面出現登入交談窗, 請直接關閉即可。

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    請如上圖將解壓縮路徑修改為 c:\ 後按 Extract 即會開始安裝。

    您也可以解壓縮到別的路徑, 不過請注意, 解壓縮的路徑名稱不能有中文, 也不能有空白, 否則使用時會發生錯誤。

    執行時可能會看到這樣的警告訊息:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    請按一下『其他資訊』:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    再按『仍要執行』即可。如果沒有『仍要執行』可按, 請試試檔案總管中找到下載的檔案, 並在檔案上按一下滑鼠右鈕候選『內容』:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    然後在『一般』頁次最下方取消勾選『解除封鎖』:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    再重新執行看看。

  2. 請開啟剛剛解壓縮時指定的路徑, 在資料夾中有個 start.exe 就是啟動 Flag's Block 的執行檔:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    Windows 10/11 請雙按 start10.exe 執行, 其他版本 Windows 請執行 start.exe。

    如果執行後看到需要安裝 .NET framework 3.5 的訊息, 可以依照畫面嘗試安裝該元件, 若無法安裝, 可以改執行 start.bat。

    若有看到這樣的警告視窗, 請按允許

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. 看到 Flag's Block 主視窗後, 請先按取消

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

安裝驅動程式

  1. 安裝控制板的驅動程式:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    按一下左上角的 功能表按鈕, 然後執行功能表中的『安裝驅動程式/Flag 1』或是『安裝驅動程式/D1 mini』。會看到以下的畫面:

    !

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    Install 繼續:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    最後安裝完成後即可關閉驅動程式安裝視窗:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

設定序列埠

  1. 使用 USB 傳輸線將控制板接到電腦上, 在左下角的 Windows 按鈕上按滑鼠右鍵:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    執行其中的『裝置管理員』後開啟畫面:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    在『連接埠』下可以看到名稱為『USB-SERIAL CH340 (COMXX)』的項目, 我們要知道的是尾端括號內的數字, 在不同電腦上或是接到不同的 USB 插孔時這個數字都可能會不同, 請以您看到的為準。

  2. 回到 Flag's Block 主畫面, 按一下左上方的 功能表按鈕後執行『設定』:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    設定交談窗中, 上方序列埠選取您剛剛在裝置管理員看到的名稱, 下方Arduino 開發板型號請依據手上的開發板選取:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

這樣就完成 Windows 版本 Flag's Block 的安裝設定了。

Mac 版本

下載安裝

如果你的作業系統是 Monterey 版本, 也就是 macOS 12.3.1 以上, 必須先下載安裝 Python 2.7.18

如果是 M1 或是 M2 晶片的 Mac 電腦, 因為處理器架構已經不一樣, 無法執行原本為 Intel 處理器製作的軟體, 如果執行 FlagsBlock, 會看到以下錯誤訊息:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

訊息中的 "bad CPU type" 就是指處理器不相容。不過 Apple 公司提供有 Rosetta 處理器模擬軟體, 安裝後即可執行原本為 Intel 處理器設計的軟體。請開啟終端機, 並在終端機中執行以下指令:

% softwareupdate --install-rosetta I have read and agree to the terms of the software license agreement. A list of Apple SLAs may be found here: http://www.apple.com/legal/sla/ Type A and press return to agree:

輸入 A 再按 Enter 同意授權條款即可自動完成安裝:

 A
2023-05-24 13:58:04.868 softwareupdate[798:17776] Package Authoring Error: 032-48321: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute
Install of Rosetta 2 finished successfully
codemee@codemeedeMac-mini ~ %
  1. 進入 Flag's Block 下載頁面下載 FlagsBlock_vXXX.dmg(XXX 為版本編號) 磁碟映像檔:

    若進入下載頁面出現登入交談窗, 請直接關閉即可。

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 請雙按後即可將磁碟映像檔掛接到系統上, 系統會直接開啟該磁碟內容:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    如果沒有開啟, 也可以自行到桌面上或是 finder 左側邊欄中找到 FlagsBlock 磁碟。

  3. 請將磁碟中的 FlagsBlock 資料夾複製到其他地方, 底下的例子我們將它複製到『文件』下我們自己新建立的 fb 資料夾中, 您可以複製到自己喜愛的資料夾中:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    由於 FlagsBlock 磁碟是唯獨的, 無法寫入資料, 請務必複製資料夾再進行後續的步驟, 否則之後使用會發生錯誤。

  4. 雙按開啟剛剛複製的資料夾, 其中的 start 就是 FlagsBlock 軟體的啟動檔:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  5. 由於目前 macOS 對於網路上下載的應用程式管制較為嚴格, 因此不能直接雙按執行 start, 請按住 Ctrl 不放, 再按一下 start:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    然後執行功能表中的『打開』, 會看到以下警告訊息:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    請按一下打開, 即可開啟 FlagsBlock:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    可按確定進行後的步驟。

    如果沒有依照上述流程, 直接雙按執行資料夾中的 start, 會看到以下的警告訊息而無法執行:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

往後只要雙按 start 就可以啟動 FlagsBlock 軟體, 不需要再步驟 5 的確認程序。

驅動程式

由於 macOS 系統已經預先備有驅動程式, 因此不需要安裝驅動程式。

手冊上指示的驅動程式官方下載網站上有提供 macOS 版本, 不過官網上的版本無法正確運作, 請絕對不要安裝。如果您已經安裝, 導致無法正確上傳程式到控制板, 請依照這一篇教學, 移除已經安裝的驅動程式。

設定序列埠

  1. 請把旗標科技創客產品中的 Arduino UNO/Nano 或是 D1 mini 控制板接上電腦。

  2. 按一下左上方的 功能表按鈕後執行『設定』:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    在序列埠中選取名稱為 cu.usbserial 開頭, 後面接著數字編號的項目, 例如:

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    接上不同的控制板, 或是接在不同的序列埠, 數字編號可能會變動, 請特別留意。

    Arduino 開發版型號中依照控制板選取對應的項目, 再按下確定之後就可以進行個別的實驗了。

如果在設定交談窗內都只會看到『找不到可用的序列埠』:

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

那很有可能是你的系統上有安裝 Python 3, 而且把 Python 2 的路徑蓋掉了。請把 Python 2.7 裝回來就好了。