Try   HackMD
tags: 工作交接

健豪移交事項

iTank

組裝

iVision image檔 - 翁健豪座位右邊的 OrangePi 裡面

零件 數量 位置
iTank 1 麻煩美櫻姐跟倉庫要
12V 電池 1 麻煩美櫻姐跟倉庫要
Orange Pi 1 地下室 (iVision 盒)
Orange Pi 外盒 1 地下室(iVision 盒)
小螺絲袋 1 地下室(iVision 盒)
12V → 5V 降壓板 1 地下室(iVision 盒)
攝影機 1 地下室 (iVision 盒)
大螺絲袋 1 地下室 (手臂遙控 盒 袋子內)
充電器(12V) 1 地下室 (iTank 充電器 盒)
Arduino Nano (需要燒入程式) 1 地下室 或是跟 iTank 零件袋
Arduino Nano 傳輸線 1 地下室 或是跟 iTank 零件袋
杜邦線 紅、黑、藍、黃色 各 1 裕雄位置旁的白色箱子
USB 轉 DC 接頭 電源線 1 裕雄位置旁的白色箱子
iArm 1 昕暐座位後面
束帶 1 裕雄後面的櫃子裡
絕緣膠帶 1 裕雄旁面的櫃子上
墊片 5 裕雄旁面的櫃子上
銅柱 1 裕雄旁面的櫃子上
3D 列印底座 1 (目前無庫存, 需要列印)
泡棉(出貨用) 1 創客教室
塑膠外盒(出貨用) 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 →

  • iVision 箱內:

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 →

  • iTank 充電器 盒內:

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 →

  • 白箱內:

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. 組裝車體

    打開底板安裝電池, 電池有兩個接頭, 一個 (通電頭) 接至 iTank 底板, 另一個 (充電頭) 穿過底板和車體的空隙, 會像是 iTank 的尾巴 (需要 iTank、12V 電池)

    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 →

    先不要關閉底板, 後續安裝手臂時也需要開啟底板

    將原始的紅外線感測頭更改為機械手臂 (需要 iArm、大螺絲包、銅柱)

    • 使用大螺絲包的螺絲、螺帽將 iArm 鎖在底板上

    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 →

    將 Arduino Nano 插到 iTank 的 插槽 (需要 Arduino Nano、Arduino Nano 線)

    • 上傳 iVision 程式到 Arduino Nano, 程式是 \192.168.0.102\rd\000.健豪交接 20210823\iTank\Arduino_Nano燒入檔案 內的 iVision_Preload

    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 IDE 安裝 \192.168.0.102\rd\000.健豪交接 20210823\iTank\Arduino_Nano燒入檔案\itank_lib 的 4 個函式庫

    組裝 Orange Pi, 並將其連接至 iTank 底板 (需要 Orange Pi、Orange Pi 外盒、小螺絲袋、12V → 5V 降壓板、杜邦線、USB 轉 DC 接頭 電源線、墊片、3D 列印底座)

    • 降壓板 安裝到 Orange Pi 外盒 上, 只需要用到降壓板上的其中 2 個鎖孔 (如圖), 並使用螺絲和各 2 個墊片 (共 4 個墊片, 用來墊高降壓板)。同時鎖上 紅、黑杜邦線 到降壓板的輸入端

    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 →

    目前還沒如上圖裝上 Orange Pi, 請先無視它

    • 組裝 Orange PiOrange Pi 外盒, 並使用小螺絲袋的螺絲將兩者鎖住 (鎖對角即可)

    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 →

    • 如果組裝好外盒後, 無法按到 Orange Pi 的按鈕, 則需要在 Orange Pi 和外盒之間再加裝一片墊片

    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 →

    • 紅、黑線接至 iTank 的 Vin 和 GND

    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 →

    • 黃、藍杜邦線到 Orange Pi 右下角的第 4、5 針腳

    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 →

    • 黃、藍杜邦線的另一頭接至 iTank 的 UART 針腳

    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 →

    • 裝上 3D 列印底座 到 iTank 上, 並將 Orange Pi 卡上

    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 轉 DC 接頭 電源線 到降壓板和 Orange Pi 上

    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 線接至 Orange Pi 的 USB 孔

    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 →

    上圖沒有束帶, 請自行加上

    到此 iVision 的硬體全部安裝完畢

  2. 燒入映像檔

    iVision 映像檔的記憶卡的內容複製到 Orange Pi 中:

    • iVision 映像檔的記憶卡插入 Orange Pi 中, 並撥動 iTank 的電源開關來通電

    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 →

    • 等待攝影機亮藍光 (代表 Orange Pi 開機完成)

    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-SCHOOL 無線網路

    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 →

    • 安裝 MobaXterm, 並設定 SSH 的 IP 位址 (192.168.100.10)Port (2222)

    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 →

    • 出現 login as: 後即可輸入登入帳號:root、密碼:23311033

    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 →

    • 鍵盤的 ↑ 即可看到下圖的指令, 如果指令正確即可按下 ENTER 執行指令

    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 →

    • 接下來會開始燒入韌體到 Orange Pi (大約 15~20 分鐘) , 燒入完成後 Orange Pi 會自動關機

    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 →

    到此燒入映像檔的步驟就完成了

  3. 操作 iTank、iVision

    使用 Orange Pi 的硬碟開機, 並由 Orange Pi 當作 AP, 供使用者連接:

    • 將記憶卡拔除, 重新通電後會使用 Orange Pi 的硬碟開機, 等到攝影機藍燈亮時, 點 2 下 iTank 的 K3 按鈕 進到 I2C 模式, 即可看到 LCD 螢幕顯示 AP SSID

    如果顯示 FlagTest 是錯誤的 !!!

    顯示 iVision 開頭才是正確的, 可以忽略下面兩個步驟

    • 如果是錯誤的名稱, 按 2 下 iVision 的按鈕 (前面可能需要加墊片的地方) 再次切換成 AP 模式

    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 下後, Orange Pi 上的紅燈會如影片快速閃爍, 當紅燈熄掉後代表設定 AP 模式完成

    • 設定完畢後, 重新通電, 這時即可看到 LCD 螢幕上會顯示 iVision 開頭的字

    • 確認 Orange Pi 建立的 AP 名稱後, 即可使用手機或是電腦搜尋 Wi-Fi 並連接它, 連線密碼:12345678

    • 成功連線後, 於瀏覽器輸入 192.168.5.1 即可看到 iVision 操作畫面

    • 出貨前請記得使用 \192.168.0.102\rd\000.健豪交接 20210823\iTank\iTank保險絲提醒.docx 來隔開保險絲(使用一小張即可), 避免運送途中開啟開關, 導致手臂在箱中通電。


    • 如果使用了 12.6V 的充電器 (目前只剩下這種), 請記得列印 \192.168.0.102\rd\000.健豪交接 20210823\iTank\iTank電池充電問題.docx 並放到出貨外盒中。

    到此 iTank、iVision 組裝全部完成

維修

替換齒輪 - 裕雄座位旁邊的白色箱子。

備用 itank - 地下室的鐵櫃上面。外盒都有貼白紙, 上面會寫檢查到的問題和我檢查的時間, 沒壞的部份可以當作其他 iTank 的維修零件;如果外盒沒有貼白紙代表我沒有檢查過, 是每次從倉庫來的時候, 多叫的備品, 可以出貨使用, 但出貨前請先檢查。

iArm - 昕暐位置後面。手臂馬達需要調整, 尚未調整完畢

F-Drive

組裝

零件 數量 位置 對應物件
車體 (含伺服、直流馬達) 1 創客教室 自駕車
3D 列印前車架 1 創客教室 自駕車
3D 列印後車架 1 自行 3D 列印 (v13_b.gcode) 自駕車
12V 電池 1 麻煩美櫻姐跟倉庫要 自駕車
各尺寸螺絲盒 1 創客教室 自駕車、紅綠燈
Orange Pi 1 創客教室 自駕車
記憶卡 1 創客教室 自駕車
Arduino Uno 1 地下室 自駕車
Arduino Uno 線 1 地下室 自駕車
馬達擴展板 1 地下室 自駕車
降壓板 (輸出要調整成 5.36V) 1 創客教室 自駕車
紅外線感測器 1 創客教室 自駕車
紅外線感測器線 1 創客教室 自駕車
直流馬達線 1 創客教室 自駕車
2 Pin 杜邦線轉 MicroUSB 線 1 創客教室 自駕車
攝影機 2 創客教室 自駕車
公母杜邦線 (20 CM) 3 創客教室 自駕車、紅綠燈
公公杜邦線 (10 CM) 6 創客教室 紅綠燈
D1 mini 1 主管辦公室 紅綠燈
D1 mini 線 1 主管辦公室 紅綠燈
鋼管 4 創客教室 紅綠燈
燈罩 24 創客教室 紅綠燈
燈條 4 創客教室 紅綠燈
3D 列印紅綠燈(半片) 8 創客教室 紅綠燈
3D 列印控制箱 1 創客教室 紅綠燈
3D 列印紅綠燈底座 2 創客教室 紅綠燈
紅綠燈底板 2 創客教室、地下室 紅綠燈
卡點西德 2 創客教室 紅綠燈
小麵包板 1 創客教室 紅綠燈
電池盒 1 創客教室 紅綠燈
​​​​組裝 PPT 放置於:
​​​​\\192.168.0.102\rd\000.健豪交接 20210823\F-Drive\自駕車出貨組裝
​​​​裡面包含『車體組裝』和『紅綠燈組裝』

出貨設定及調整

  1. 更改 AP 名稱

    自駕車通電後, 它會自己建立無線基地台, 但出貨前需要先更改其基地台名稱, 不然大家的 AP 名稱都會一樣

    • 確認目前自駕車號碼。請到 \192.168.0.102\rd\000.健豪交接 20210823\F-Drive\自駕車檔案\F_Drive_Arduino程式碼\出貨自駕車 確認目前號碼, 今天 (2021/9/10) 最新的是 F_Drive_36, 所以下一個號碼則是 37

    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 分鐘即可使用電腦連接, 其 AP 名稱為 FlagCar_**

      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 →

    • 連線成功後, 使用 TightVNC 連接, IP 位址為 10.42.0.1: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 →

      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 →

    • 進到遠端桌面後, 開啟 Terminal 視窗並輸入 nmtui

      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 →

    • 選擇 Edit a connection

      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 →

    • 選擇 Hotspot

      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 →

    • 更改 SSID 名稱, 如果新車為 37 號, 則更改為 FlagCar_37。更改完名稱並按下此頁面的 <OK> 後將 Orange Pi 重新開機, 即可看到 AP 名稱更換了。

      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. 出貨前測試 (測試自駕車循軌)

    使用 範例程式 LAB21 調整自駕車的前輪角度 (Arduino 程式), 並根據十字路口轉彎的時間更改自駕車可視範圍 (Python 程式):

    • 選擇 \192.168.0.102\rd\000.健豪交接 20210823\F-Drive\自駕車檔案\F_Drive_Arduino程式碼\出貨自駕車 資料夾內的其中一個 Arduino 程式, 另存成一個新的檔案 (名稱為 F_Drive_編號, 例如 F_Drive_37) 並上傳它

    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 IDE 安裝 Adafruit Motor Shield V2 Library (版本1.0.4):

    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 Uno 腳位 0、1 的杜邦線, 不然會上傳失敗

    • root 目錄底下, 先進到 F-Drive 資料夾 (指令:cd F-Drive), 再執行 LAB21 程式 (python3 LAB21.py)
      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 →

    LAB21.py 會讓自駕車自動循軌, 第 1 次到十字路口會先右轉、第 2 次左轉、第 3 次直走, 後續則是程式 隨機(random) 選擇其中一種。下列為車子可能遇到的狀況及如何調整:

    • 車子在直走過程中, 車子沒有維持在車道中間。 調整 Arduino 程式第 14 行, 數值越大, 車輪轉越右, 反之越左, 調整到車子維持在車道中間即可。

    • 車子在轉彎過程中, 車子會壓內側 (外側) 線。 調整 Arduino 程式第 17、18 行 (如果左轉壓線調整 17 行、右轉壓線則調整 18 行), 壓內側線代表轉太多, 因此可以將數值調接近 mid 值 (mid_left 調大、mid_right 調小);壓外側線代表轉太少, 因此可以將數值調遠離 mid 值 (mid_left 調小、mid_right 調大)。

    • 十字路口轉彎壓線。調整 Arduino 程式第 15、16 行 (如果左轉壓線調整 16 行、右轉壓線調整 15 行), 壓內側線代表轉太多, 因此可以將數值調接近 mid 值 (right 調小、left 調大);壓外側線代表轉太少, 因此將數值調遠離 mid 值(right 調大、left 調小)。

    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 →

    • 十字路口太早 (晚) 轉彎。調整 LAB21.py 第 216 行, 太早轉彎代表它太早看到對面斑馬線 (自駕車轉彎的依據是看對面斑馬線), 所以要縮小看斑馬線視窗的高度 (也就是 y 軸), 目前程式 216 行的 y 軸為 87, 因為畫面是從左上角作為 (0,0), 所以要縮小視窗時, 就需要將 y 值加大

    原始:

    ​​​​src_pts_high = np.float32([[25,105],[55,87],[160,87],[190,105]])
    

    更新:

    ​​​​src_pts_high = np.float32([[25,105],[55,90],[160,90],[190,105]])
    

    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 →

    反之太晚轉彎則是太晚看到對面斑馬線, 所以要放大看斑馬線視窗的高度, 也就是將 y 的數值調小

    原始:

    ​​​​src_pts_high = np.float32([[25,105],[55,87],[160,87],[190,105]])
    

    更新:

    ​​​​src_pts_high = np.float32([[25,105],[55,84],[160,84],[190,105]])
    
    • 十字路口直接轉彎。當車子遇到十字路口就馬上轉彎, 這時就是看斑馬線視窗太小, 導致視窗內出現車子這側的斑馬線, 要避免此問題就需要放大看斑馬線視窗的高度

    原始:

    ​​​​src_pts_high = np.float32([[25,105],[55,87],[160,87],[190,105]])
    

    更新:

    ​​​​src_pts_high = np.float32([[25,105],[55,84],[160,84],[190,105]])
    

    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 →

    如有調整 LAB21.py 第 216 行程式, 就需要連帶調整 LAB22.py、LAB24.py、LAB25.py 和 LAB26.py 的同段程式。

    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 →
    確認 216 行的 y 軸數值後, 請一定要紀錄數值到 \192.168.0.102\rd\000.健豪交接 20210823\F-Drive\自駕車檔案\Python程式更改處(自駕車).docx

    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 →


    如果不紀錄, 學生把映像檔洗掉, 就沒有辦法得知此車子的數值, 就需要重新測試。

    到此就完成出貨設定及調整, 為了讓學生可以拿到剛剛設定的資料, 請將 『\192.168.0.102\rd\000.健豪交接 20210823\F-Drive\自駕車檔案』上傳至 flagtec@gmail.com 雲端硬碟的自駕車檔案:
    https://drive.google.com/drive/folders/1BazHaKOTDFa1kl9VMH9qWW82SC6bpL8m
    ;還有將其燒錄成光碟, 出貨時需要。

組裝完自駕車並調整參數後即可準備出貨

自駕車出貨細節:

1.向美櫻姊要電池

2.到地下室R左1上的最右邊拿充電器

3.創客教室拿出貨鋁箱+泡棉

4.架簡易場地對自駕車進行測試(彎道、紅綠燈)
ps 自駕車要搭載新電池進行測試

5.燒錄自駕車檔案至光碟(M:/),自駕車編號檔案記得放入

6.將新電池用新充電器充飽

7.裝箱出貨(記得放入光碟、Arduino線、電池、充電器與泡棉)

展示步驟

展示時需要準備一下東西:

零件 數量 備註
筆電 1 需先安裝 TightVNC
自駕車 1 目前裡面的程式是競賽程式 (遇到障礙物太久會倒退)
自駕車塑膠箱 1 鋁箱太大, 無法放到行李箱中
場地 1 創客教室有 2 組, 皆可使用
紅綠燈控制箱 1
紅綠燈 1
絕緣膠帶 (黑色) 1 黏貼場地用
行動電源 (可要可不要) 1 供紅綠燈使用 (也可以直接電腦的 USB 孔)

根據展示現場的大小決定要半場或是全場 (半場較好展示, 只需要測試兩個方向的紅綠燈)。統一執行 LAB26.py 即可。

注意事項

  • 半場無法讓車子在十字路口任意轉, 所以只能不斷右轉或左轉來避免在十字路口轉出場地。要讓自駕車不斷右轉或左轉需要調整 LAB26.py 的第 257 行 (目前是註解狀態), 關閉註解後, z=1 代表右轉z=3 代表左轉

  • 請避免將場地擺放在陽光照射到的場所, 就算是人眼看起來不強的陽光, 也很有可能影響到自駕車的辨識。

  • LAB26.py 使用 多執行序 執行程式, 一個辨識道路, 另一個偵測紅綠燈。要結束程式時, 先點擊對應功能的視窗 (偵測紅綠燈只會有 1 個, 其他皆是辨識道路), 再按 q 鍵(大小寫皆可) 即可關閉程式, 也就是說要按 2 次 q 鍵 LAB26.py才會完全停止 。

  • 如果紅綠燈辨識效果不佳, 請試著將背景單純化, 如果場地不允許, 可以使用 1 張場地的背面 (純白) 放在紅綠燈後, 讓紅綠燈的背景可以全白。

  • 如果自駕車通電後無法尋找到 AP, 只要重新通電即可。

  • 展示避障功能時, 車子會先停止, 等到障礙物移開後, 會再繼續前進, 但有時候移開障礙物後, 車子會直接轉出車道 (還不知道實際原因, 目前推斷是障礙物檔路的過程中, 車子有瞬間把它認為是十字路口停止線, 所以就進入十字路口轉彎模式), 這時只能按 q 鍵結束程式, 重新執行程式。

競賽場地

零件 數量 位置
計分模組 1 地下室
場地 1 地下室
空水瓶 27 地下室
紅綠燈 1 創客教室 (行李箱內)

場地解說影片放在 \192.168.0.102\rd\000.健豪交接 20210823\F-Drive\自駕車競賽解說.mp4

紅綠燈出貨

  • 到創客教室拿取以下材料
    1. 金屬桿X4
    2. 紅綠燈殼X8
    3. 紅綠燈座X2
    4. 木板X2
    5. 紅綠燈照一盒(白色箱子)
    6. 電池座X1
    7. 燈株一組
  • 到地下室拿取電池盒X1、小麵包板X1,都在右邊鐵櫃
  • 組裝完成後找美櫻姊拿披薩盒,放入紅綠燈組+杜邦線20CM+micro USB 線

創客產品

如果交接區沒有找到檔案, 我的專案可以到我的電腦尋找, 路徑在 D:\創客, 對應資料夾名稱如下:

  • FM619A 資料夾名稱:療癒紅綠燈
  • FM623A 資料夾名稱:AIOT
  • FM627A 資料夾名稱:自駕車
  • FM629A 資料夾名稱:unity_互動遊戲
  • FM630A 資料夾名稱:RPI-PICO_FM630A
  • FM631A 資料夾名稱:ESP32套件_IoT

如果是立翔、育豪和士豪的專案可以在路徑 M:\翁健豪 尋找。

雷切檔案

  • FM624A
    \192.168.0.102\rd\000.健豪交接 20210823\創客產品\雷切檔案\FM624A.dxf

  • FM627A
    \192.168.0.102\rd\000.健豪交接 20210823\創客產品\雷切檔案\FM627A.dxf

  • FM628A
    \192.168.0.102\rd\000.健豪交接 20210823\創客產品\雷切檔案\FM628A.dxf

  • FM629A
    \192.168.0.102\rd\000.健豪交接 20210823\創客產品\雷切檔案\FM629A.dxf

紀錄雷切機使用說明

產品服務

  • FM619A 紅綠燈上傳網頁資料

    那請幫我點擊一下 FlagsBlock 左上角的工具列
    並點擊當中的 上傳網頁資料
    然後請幫我到 FlagsBlock 的資料夾
    裡面有一個 www 資料夾
    點進去
    會有一個檔案叫做 trafficLight_default.h
    選擇它後 FlagsBlock的右上角會顯示 網頁資料已上傳
    那請現在點擊橘色按紐上傳程式

  • FM627A 馬達驅動板問題

    請按下 D1 mini 上的 reset 鍵
    並且馬上按下 thonny 上的 stop 鈕, 並再按下"執行鍵"
    這個錯誤訊息是因為馬達驅動板太久沒接收到命令
    所以會報 timeout 的錯誤
    所以要將 D1 mini reset
    再馬上執行程式(也就是給馬達驅動板命令)
    就可以囉
    也可以參考 LAB01 的影片, 將目前程式存到 MicroPython 設備中, 並命名為 main.py

  • FM627A 自駕車預設程式錯誤 (裡面是我們測試網路功能的程式)

    請參考 P.08~P17 左上角的內容
    點選 thonny 工具列的檢視
    並勾選『檢視』當中的"檔案"
    如果成功勾選的話
    會看到 thonny 左半邊出現"檔案"視窗
    當中有 MicroPython 設備
    雙擊 main.py

    ​​​​import wemotor ​​​​import time ​​​​motor = wemotor.Motor() ​​​​motor.move(20,80) # 左轉 ​​​​time.sleep(1) ​​​​motor.move(80,20) # 右轉 ​​​​time.sleep(1) ​​​​motor.move(0,0) # 停止

    請幫我這段程式碼複製
    並將剛剛 main.py 的內容全部刪除
    將這段程式碼貼上
    並按下 ctrl+s 儲存
    接下來到下載檔案中找到『模組』資料夾
    並將 wemotor.py、ESP8266WebServer.py 這兩個檔案上傳至 D1 mini
    上傳方式可以參考 P.22頁
    接下來就可以按一下 D1 mini 的 reset 鍵了
    應該就可以正常執行囉

專案

  • FM634A

    Thonny 程式放在 \192.168.0.102\rd\000.健豪交接 20210823\創客產品\FM634A\範例程式