1 / 59

Arduino 入門與物聯網應用

Arduino 入門與物聯網應用. 台中教育大學 資訊科學系 李宗翰. 大綱. Arduino 介紹 Arduino 實作 Inetnet of Things 物聯網 Internet of Things 應用. Arduino 介紹. 何謂 ”Arduino” Arduino 架構 軟體 硬體 社群. 何謂 Arduino?. 義大利 Italy 設計者 Massimo Banzi David Cuartielles Tom Igoe Gianluca Martino David Mellis . 2005.10.1 第一批

sarai
Télécharger la présentation

Arduino 入門與物聯網應用

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. Arduino 入門與物聯網應用 台中教育大學 資訊科學系 李宗翰

  2. 大綱 • Arduino介紹 • Arduino實作 • Inetnet of Things 物聯網 • Internet of Things 應用

  3. Arduino介紹 • 何謂”Arduino” • Arduino架構 • 軟體 • 硬體 • 社群

  4. 何謂Arduino? • 義大利Italy • 設計者 • Massimo Banzi • David Cuartielles • Tom Igoe • Gianluca Martino • David Mellis. • 2005.10.1第一批 • 快速開發prototype:artists、designers、 hobbyists • OPENSOURCE • 軟體+硬體+社群

  5. Arduino架構_軟體_OPEN魅力 • 開放IDE軟體原始碼,可針對底層做修改。 • 相同軟體平台,透過OPEN,快速累積應用範例。 • 玩家、廠商提供多元函式庫

  6. Processing.org

  7. Fritzing.org

  8. Arduino架構_硬體 • 數位I/O腳 • PWM腳 • 類比輸入腳 • 供電系統 • 電源輸出 數位 I/O腳位:P0~P13 6組PWM輸出 雙供電系統 10Bit解析度 類比訊號輸入 三種電源輸出供應Vin、5V、3.3V

  9. Arduino架構_硬體_OPEN魅力 • Arduino不生產周邊硬體不綁死周邊裝置價格平實 • 周邊裝置搭配arudino腳位開發 • 硬體電路開放,可自行製作與開發 • 硬體資源說明文件多 • Arduino.cc/playground

  10. DIYArduino

  11. Freeduino系列 Ardupilot Boarduino Seeeduino Relayduino Openlog brasuino Fio

  12. 擴充Shield WIFI模組 MP3播放板 SD卡模組 GPRS模組 AV端子顯示模組 COLORLCD模組 CANBUS模組 RFID模組 MIDI 訊號模組

  13. Arduino架構_社群

  14. 玩家 官方提供Blog資料: 近200處 http://www.arduino.cc/playground/Main/People

  15. 周邊廠商 • 超過200家周邊製造商與代理商 • RFrobot • Seeed Studio • DIYDrones • Sparkfun • Pololu • Adafruit • Make Magzine • OceanControl • Robotshop • ModernDevice

  16. Arduino架構_軟體 • Bootloader預先載入的程式 • 流程: • 編寫Arduino Code • PC端 Arduino IDE • USB(RX、TX) • ArduinoIO板 • Bootloader程式轉換機器碼 • Arduino Work • 高階C語言函式化的指令 • 類似裝置:Basic Stamp

  17. Arduino開發環境 • 軟體下載:http://arduino.cc/en/Main/Software

  18. Arduino開發環境 開啟檔案 儲存檔案 編譯 載入 終端機顯示 停止 開新檔案

  19. Arduino開發環境

  20. Arduino開發環境

  21. Coding in Arduino void setup () { //... setup pins } void loop () { //... main loop }

  22. Arduino開發環境

  23. Arduino開發環境

  24. Arduino使用語法

  25. Arduino使用語法

  26. Arduino使用語法

  27. Arduino使用語法

  28. 實作_ Arduino實作練習

  29. 實作_ Arduino實作練習

  30. Arduino實作練習 • 練習一: 載入Basics範例的Blink

  31. Blink • LED腳位: 長腳+

  32. Arduino實作練習 • 練習二: 載入Digital範例的Blinkwithoutdelay

  33. BlinkwithoutDelay • LED腳位: 長腳+

  34. Arduino實作練習 • 練習三: 載入 Basic 範例的 DigitalReadSerial

  35. Digital Read Serial (UART to USB)

  36. Arduino實作練習 • 練習四: 載入 Analog 範例的 AnalogInput

  37. 1 2 3 AnalogINPUT 電阻成指數遞增,代號A 電阻成線性遞增,代號B 10bit解析度 電阻 電壓

  38. Arduino實作練習 • 練習五: 載入 Analog 範例的 Fading

  39. PWM 脈波寬度調整Pulse Width Modulation

  40. PWM • 模擬類比電壓輸出 • 腳位3.5.6.9.10.11 • PWM頻率 • 980Hz : 5,6 • 490Hz :3, 9, 10, 11 • PWMDuty Cycle

  41. Analog output in PWM

  42. Arduino實作練習 • 練習六: 載入 wire 範例的 Master Writer/Slave Receiver

  43. I2C 傳輸實驗 • Master Writer/Slave Receiver • 本範例將利用I2C連結二組Arduino,並同步傳送與接收數位資料 • Master • 每0.5秒,傳送 6 bytes 資料至Slave. • Slave • 當接收到Master所傳來之資料後,將會顯示在Arduino's serial window.

  44. 以 I2C 連接兩組 Arduino • 連接兩組Arduino之pin 4 (the clock, or SCL, pin) 與 pin 5 (the data, or SDA, pin). • 確認兩組 Arduino 採用共用接地方式連接. • Slave Arduino 須以USB連接PC並開啟 Arduino Serial Window觀察其接收資料的狀況.

  45. Internet of Things 物聯網 • 概念 • 應用

  46. 物聯網概念 • 物聯網(The Internet of things)的定義是:通過射頻識別(RFID)、紅外感應器、全球定位系統、鐳射掃描器等資訊傳感設備,按約定的協定,把任何物品與互聯網連 接起來,進行資訊交換和通訊,以實現智慧化識別、定位、跟蹤、監控和管理的一種網路。 • 物聯網就是“物物相連的互聯 網”。 這有兩層意思: • 第一,物聯網的核心和基礎仍然是互聯網,是在互聯網基礎上的延伸和擴展的網路; • 第二,其用戶端延伸和擴展到了任何物品與物品之間,進行資訊交換和通訊。

  47. 物聯網發展 • 物聯網(The Internet of things)的概念是在1999年提出:Foundation of Auto-ID center of MIT (RFID technology) • 2003 SUN article: Toward a Global “Internet of Things” (Via) • 2005年11月17日:在突尼斯舉行的資訊社會世界峰會(WSIS)上,國際電信聯盟(ITU)發佈《ITU互聯網報告2005:物聯網》 • 2009年1月23日:IBM Smart Planet,奧巴馬針對IBM首席執行官彭明盛首次提出“智慧的地球”這一概念,做出回應:物聯網技術美國在21世紀保持和奪回競爭優勢的方式 • 2009年9月:Internet of Things – An action plan for Europe 歐盟行動計畫 • 物聯網(Internet of Things, IoT)的興起與快速發展,依據美國Forrester預測至2020年全球物物互聯的服務量,跟人與人通信的服務量相比,將達到 30比 1,被稱為是下一個十兆元級的資通訊創新應用。

  48. 物聯網的新思維 • 物聯網打破了傳統思維。物理基礎設施和IT基礎設施 • 物聯網時代:鋼筋混凝土、電纜將與晶片、寬頻整合為統一的基礎設施。  • 物聯網的世界裡每個物件具備識別ID、感知與理解能力、控制與管理功能,並透過網路彼此連結,經由智慧的感知、可靠的傳遞與智慧的處理,賦予物件智慧,實現「人與人」、「人與物」、「物與物」間的溝通和對話功能。依功能面區分,物聯網基本架構可分為: • 「感知/設備層」 • 「網路層」 • 「中介/平台層」 • 「服務層」 • 「消費層」

  49. 物聯網概念

  50. 感知/設備層 • 由許多可擷取及量測資訊之感知元件/設備所組成 • 具感知與理解能力可以監測所在位置的物理或環境狀況(例如:溫度、濕度、照度、速度等); • 控制與管理功能可以接受遠端設定、操作。 • 為了連結廣泛分布的「感知/設備層」元件,低耗電、低成本、支援大量網路節點的無線感測網路(Wireless sensor network)通訊技術被引用,這當中技術包括: • ZigBee、Z-Wave、6LowPAN (IPv6 over Low power Wireless Personal Area Networks)等。 • WSN Gateway從分散的WSN測量節點匯總數據並扮演通信協定轉換的角色,串聯「感知/設備層」與「網路層」。

More Related