1 / 99

LinkIt 7697物聯網研習 資料區 : https :// goo.gl/a13hTR

LinkIt 7697物聯網研習 資料區 : https :// goo.gl/a13hTR. CAVEDU 徐豐智. 硬體介紹. LinkIt 7697. 聯發科技最新的物聯網開發板 Wi-Fi / BLE 雙通訊功能 採用主流 Cortex-M4 架構 開放的軟體開發環境 (FreeRTOS). LinkIt 7697 開發板外觀介紹. WrtNode 7 無線模組 內含: MediaTek MT7697 SoC 快閃記憶體 天線. 重置按鈕 (RST). UART0 傳輸燈號 (P0/P1). 供電指示燈. 自定義燈 (P7).

jortiz
Télécharger la présentation

LinkIt 7697物聯網研習 資料區 : https :// goo.gl/a13hTR

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. LinkIt 7697物聯網研習資料區:https://goo.gl/a13hTR CAVEDU 徐豐智

  2. 硬體介紹

  3. LinkIt 7697 • 聯發科技最新的物聯網開發板 • Wi-Fi / BLE 雙通訊功能 • 採用主流 Cortex-M4 架構 • 開放的軟體開發環境 (FreeRTOS)

  4. LinkIt 7697 開發板外觀介紹 WrtNode7 無線模組內含: • MediaTek MT7697 SoC • 快閃記憶體 • 天線 重置按鈕 (RST) UART0 傳輸燈號 (P0/P1) 供電指示燈 自定義燈 (P7) 使用者自定義按鈕 (P6) CP2102N UART 轉 USB 晶片 製造廠商:Silicon Labs

  5. LinkIt 系列開發板比較 *1 沒有開源 *2 隨著台灣 2G 關台, GSM/GPRS 和 GNSS 的功能應用性就不高

  6. 腳位圖https://labs.mediatek.com/en/download/1ega2lbl

  7. 腳位圖與 Arduino 對應關係https://labs.mediatek.com/en/download/1ega2lbl Digital Pin 以絲印上面的數字作為參數,例: digitalWrite(7, HIGH); Analog Pin 以絲印上面的數字作為參數,或使用 A0 ~ A3

  8. Seeed 7697 Grove套件包 • Grove Breakout x1 • Grove - IMU 9DOF x1 • Grove – Temperature & Humidity Sensor Pro x1 • Grove - Ultrasonic Ranger x1 • Grove - Relay x1 • Grove - OLED Display 0.96" x1 • Grove - Light Sensor x1 • Grove - LED Bar x1 • Grove – Servo x1 • Breadboard 82mm x 53mm x1 • Button x5 • 10K Ohm Rotary Potentiometer x1 • 1K/10k/330 Ohm Resistor x1 • RGB LED x1 • Red LED x5 • Micro USB Cable – 48 cm x1 • Breadboard Jumper Wire x25

  9. Arduino IDE setup

  10. Arduino IDE 下載 • 請下載 Arduino 1.6.4 以後的版本 • 從 board manager 安裝 7697 套件 • 下載CP2102N驅動程式

  11. 在Arduino IDE 偏好設定中貼上這個連結 • File / Preferences • http://download.labs.mediatek.com/package_mtk_linkit_7697_index.json • 旁邊的按鈕可以加入多個定義檔

  12. 在選單中看到 7697,按 Install • Tools / Board / Boards Manager • 目前最新版為 0.7.4

  13. 完成之後就可以看到 7697 了 • 在很下面…

  14. 安裝 driver,請把 7697 接上電腦 • 下載CP2102N驅動程式,並根據您的作業系統版本來安裝 x86/x64版本 • 安裝完畢之後請將7697接上電腦,就可自動抓到它。

  15. 抓到COM port

  16. 如果無法編譯 • 請到以下路徑檢查,是否有 0.7.4 (最新版本) 之資料夾,其他檔案請刪除 • C:\Users\user\AppData\Local\Arduino15\packages\LinkIt\hardware\linkit_rtos

  17. BlocklyDuino for LinkIt 7697 今天請用google drive上的 blockyduino.v2.2.1.rar 來上課喔!

  18. BlocklyDuino for LinkIt 7697 • 視覺化的程式編輯環境 • 不只適用於LinkIt 7697 • 周邊I/O指令已經準備好 • Open source (github)

  19. BlocklyDuino for LinkIt 7697的優點 • 可離線執行(github) • 能產生對應的Arduino sketch ,便於學習與除錯 • 與Arduino IDE結合,函式庫相容性與擴充性高 • 可快速驗證想法可行性 • Open source

  20. 離線執行 • 根據您所使用的作業系統(Windows 32/64, MAC, Linux32/64)解壓縮之後,點擊執行檔即可開啟

  21. Blockly Arduino 優點: • 適合進階學生,完成較複雜的功能 • 除錯較為方便 優點: • 適合入門,培訓基礎程式能力 • 降低門檻,沒有硬梆梆的英文與程式碼

  22. 右上角的設定

  23. 如何匯入範例 • 在BlocklyDuino 右上角點選”匯入” • 把github所下載之 /examples/ 各範例中的 .xml 檔貼進去即可

  24. 完成了

  25. LESSON 1 : BLINK

  26. LED閃爍 按存檔,即可同步存入IDE中 • Linkit 7697 上有一個內建的LED 燈,上面寫著 USR 三個字。 • Linkit 7697的內建 LED 燈和 PIN 7 在板子內部的線路並聯的 點選Arduino 可轉換為Arduino Sketch

  27. LESSON 2 : 電位計控制LED

  28. 線路示意圖 範例在雲端:code/Blocky/example/lightsensor

  29. Demo (實際示例) 利用A0腳位的數值變化,控制D7 LED是否亮滅。

  30. Arduino Sketch

  31. LESSON 3 : SERVO

  32. 用7697 控制Servo 範例在example/servosweep

  33. 您將在本例子使用的Block • 如果 < 事件 > 執行 < 事件 > • < 資料 > 大於 < 資料 > • < 數字 > • 賦值 < 資料型態 > < 變數 > 到 < 資料 > • 加入 Setup() • 延遲 < 資料 > • 寫入 Pin < 腳位 > 角度 < 資料 >

  34. Demo (實際示例) Servo 會在一開機轉回原點,之後在每秒都會多轉 15 度直至轉滿 180 度,接著再次回到原點不斷重複。

  35. Arduino Sketch

  36. Examples/LWiFi/WiFiWebClient

  37. MediaTek Cloud SandBox https://mcs.mediatek.com

  38. MediaTek Cloud Sandbox (MCS)

  39. MCS主要功能 • 雲端平台,執行程式 • 例:Google App Engine、Amazon Web Services、Microsoft Azure • 提供網頁介面,讓你「點按滑鼠」就能建立雲端程式 • 提供API程式存取介面 • 提供網頁介面,觀看與控制各種資料

  40. MCS其他功能 • 通知(Notification),當某資料符合特定條件時,寄送電子郵件 • 使用者權限(User Privilege),設定開發成員的存取修改權限 • FOTA(Firmware Over The Air),版本控管,韌體經由無線傳輸自動更新

  41. 目標 • 到MCS註冊帳號 • 建立網頁應用程式(web application) • 透過MCS REST API進行溝通 • LinkIt 家族開發板、手機、瀏覽器

  42. 範例 • 從雲端控制板子內建的LED • LED:想像成家裡的燈 • 為什麼從雲端?不能直接連線嗎?

  43. MCS重要觀念與名詞 • Prototype,裝置原型,具備各種 data channel • Data Channel,帶有時間資訊的資料串 • Data Channel Id:對應的資料接口 • Datapoint:每筆上傳的資料 • Test Device,想像為實際執行後的程式 • DeviceId、DeviceKey:用這個來鎖定裝置 • 例:LED控制器、溫濕度感測站

  44. MCS Android app • Google Play 下載

  45. MCS Dashboard(儀表板)

  46. MCS 重要選項 • Console:主控台 • Development:建立Prototype、新增修改Data channel、查詢Data channel Id • Test Devices:查詢DeviceId、DeviceKey • Resources:教學文件、參考資料 • Resources:常見問題、論壇、回饋

  47. 範例:控制LED並檢視狀態 程式:mcsled.js

  48. 流程 建立Prototype 依照所需功能,新增Data channel,記下Data channel Id 建立Test device,記下DeviceId與DeviceKey

More Related