1 / 12

Lego NXT 機器人程式設計 單元二

Lego NXT 機器人程式設計 單元二. 侯人俊老師. 比賽規則. 利用 5 個步驟的程式,讓機器人繞圓圈,小組討論 5 分鐘設計程式。 計時 2 分鐘繞最多圈獲勝。. 程式設計步驟. 計畫 -> 設計 -> 執行 -> 修改. 學習單. 小組完成第一單元學習單。. NXT-G 控制軟體 _MoveBlock. 移動命令方塊 Steering 方向舵 Duration 運轉期間 Seconds 秒數 Rotations 圈數 Degree 角度 Unlimited 無限 Next Action 執行命令後的馬達狀態 Brake 煞車

arden
Download Presentation

Lego NXT 機器人程式設計 單元二

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LegoNXT機器人程式設計單元二 侯人俊老師

  2. 比賽規則 利用5個步驟的程式,讓機器人繞圓圈,小組討論5分鐘設計程式。 計時2分鐘繞最多圈獲勝。

  3. 程式設計步驟 計畫 -> 設計 -> 執行 -> 修改

  4. 學習單 小組完成第一單元學習單。

  5. NXT-G控制軟體_MoveBlock • 移動命令方塊 • Steering方向舵 • Duration運轉期間 Seconds秒數 Rotations圈數 Degree角度 Unlimited無限 • Next Action執行命令後的馬達狀態 Brake煞車 Coast自由轉動

  6. 測試程式 拉2個移動命令方塊 設定前進1秒 設定停止 下載程式到主機上,移除USB線 由My Files -> Software files -> 程式名稱,按確定執行

  7. 不拔除USB線,拿著主機,更改Duration運轉期間為不拔除USB線,拿著主機,更改Duration運轉期間為 1 Rotation 是否轉1圈 360 Degree 是否為轉1圈 90 Degree是否為轉1/4圈 Unlimlted 是否為不停運轉

  8. NXT-G控制軟體_WaitBlock Unlimlted無法發揮功能,使用等待命令方塊配合 拉出一個等待命令方塊 設定5秒並下載、測試

  9. 將等待命令方塊改為Senser,並接上觸碰感應器 測試 Action設定感應器狀態 Pressed壓下(通常用此設定) Released放開 Bumped壓下再放開

  10. 開一個新的程式 使用LoopBlock

  11. 設計程式 機器人前進(Unlimited) 等待觸碰感應器壓下 機器人後退2秒 程式循環(Loop)

  12. 設計直線折返車 簡易運作流程 機器人由起跑線前進 機器人碰到牆壁 機器人後退到起跑線 機器人前輪停止在起跑線 調整馬達Power加快速度 比賽哪一組離起跑線最近、最準確 距離牆壁1公尺,比賽時間2分鐘,來回最多次獲勝 完成學習單

More Related