11
KUAS 國立高雄應用科技大學 本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。 The information is provided and used within laboratory only and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission. Index 目錄 1. Purpose 目的 2. Scope 適用範圍 3. Reference 相關參考文件 4. Equipment Terminology 設備名詞 5. Procedure And Explanation 作業程序 DOC TITLE 文件名稱: Arduino YUN 操作說明書 Arduino YUN Operation Manual PAGE 頁次 1 NO.編號 REV 版次 A

KUAS 國立高雄應用科技大學 - kuas.edu.t Yun.pdf · -點選視窗中的”工具”→板子→Arduino Yun 7. 填寫程式(範例-Blink) DOC TITLE 文件名稱: Arduino

Embed Size (px)

Citation preview

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

Index 目錄

1. Purpose 目的

2. Scope 適用範圍

3. Reference 相關參考文件

4. Equipment Terminology 設備名詞

5. Procedure And Explanation 作業程序

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 1

NO.編號 REV 版次

A

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

1. Purpose 目的

制定使用 Arduino YUN 設備規範,確保操作過程符合規定,以供

使用人員遵循。

2. Scope 適用範圍

實驗室設備操作適用,例:機器人控制、量測

3. Reference 相關參考文件

http://arduino.cc/en/Main/ArduinoBoardYun

4. Equipment Terminology 設備名稱

中文名稱:Arduino YUN

英文名稱:Arduino YUN

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 2

NO.編號 REV 版次

A

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

5. Procedure and Explanation 操作程序:

5.1 設備說明:

圖一 Arduino YUN Front

圖二 Arduino YUN Back

產品規格

圖三 這 Arduino 板子不同的地方在於,有一顆微控制器 ATmega32U4 和一顆 Atheros

AR9331,運行 Linux發行套件 Linino,並且連接有線網路(Ethernet)與無線網路(WiFi),

另外也連接板子上的 USB A 埠(主方)與 micro SD 卡插槽。

參考處:http://yehnan.blogspot.tw/2013/10/arduino-yun.html

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 3

NO.編號 REV 版次

A

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

微控制器 ATmega32u4 規格

AVR Arduino microcontroller

Microcontroller ATmega32u4

Operating Voltage 5V

Input Voltage 5V

Digital I/O Pins 20

PWM Channels 7

Analog Input Channels 12

DC Current per I/O Pin 40 mA

DC Current for 3.3V Pin 50 mA

Flash Memory 32 KB (of which 4 KB used by

bootloader)

SRAM 2.5 KB

EEPROM 1 KB

Clock Speed 16 MHz

微控制器 Atheros AR9331 規格

Linux microprocessor

Processor Atheros AR9331

Architecture MIPS @400MHz

Operating Voltage 3.3V

Ethernet IEEE 802.3 10/100Mbit/s

WiFi IEEE 802.11b/g/n

USB Type-A 2.0 Host

Card Reader Micro-SD only

RAM 64 MB DDR2

Flash Memory 16 MB

PoE compatible 802.3af card support (see

the note below)

Length 73 mm

Width 53 mm

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

電源供應

可以利用電腦連接

可以使用電池,連接線為 2.1mm 陽性插頭

適合用 7-12V 的電池,低於 7V 電路板會不穩定,高於 12V 會過熱損壞

電源引腳如下:

VIN,外部電源供應電壓的接腳

5V,可以輸出 5V 的穩壓,

(不建議用此接頭供電,怕損壞板子)

3.3V,可以輸出 3.3V 的穩壓,最大電流為 800mA

GND,接地腳

Input and Output

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 5

NO.編號 REV 版次

A

• a USB-A port,

• micro-SD card slot,

• 20 digital input/output pins

• a 16 MHz crystal oscillator

• a micro USB connection,

• an ICSP header

• a 3 reset buttons.

圖四 Arduino YUN 示意圖

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

5.2 操作步驟:

圖五概述流程表

1. 下載安裝 Arduino IDE

http://arduino.cc/en/Main/Software

2. 安裝後,打開 Arduino,圖示如圖六

3. 出現 Arduino 程式草稿視窗,如圖七

安裝軟體 連接電腦

點選序列埠、板子種類

撰寫程式 程式驗證

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 6

NO.編號 REV 版次

A

圖六桌面 Arduino 圖示

圖七 Arduino 程式草稿視窗

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

4. 選擇連接電腦方式

• 將 YUN 板接上電源

• 有三種方式可以傳送程式資料

– Pro.Micro USB-直接連接電腦,可以使電腦直接供電於板子,並且直接撰

寫程式燒入

– 有線傳輸(Ethernet)-接上網路線填寫程式

– 無線傳輸(wifi)-在 wifi 區域中搜尋 YUN 板的訊號,並且選取撰寫程式。

接上 Pro.Micro USB(第一種連接方式)

先將 YUN 板利用 USB 傳輸線連到電腦,安裝驅動程式後,找尋 Arduino YUN 位

於那個 com 點上

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 7

NO.編號 REV 版次

A

圖八 利用 USB 傳輸線連接到電腦 圖九 找尋 ArduinoYUN 位於哪個 com 上

圖十 ArduinoYUN 位於 com11 上

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

連接無線網路 wifi(第三種連接方式)

5. 點選序列埠(Port),以下為連接 Pro.Micro USB 及 wifi 兩種方式說明

連接 Pro.Micro USB-點選視窗中

的”工具”→序列埠→ com11

連接 wifi-點選視窗中的”工具”→序

列埠→ Arduino at 123.456.789.0

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 8

NO.編號 REV 版次

A

圖十一 手機板偵測到相對應

的 wifi 訊號

圖十二 電腦板搜尋到相對應的

wifi 訊號

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

6. 點選板子

-點選視窗中的”工具”→板子→Arduino Yun

7. 填寫程式(範例-Blink)

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 9

NO.編號 REV 版次

A

程式碼分頁

程式內容

訊息顯示區

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

8. 點選工具列的驗證鍵

• 程式驗證成功,訊息顯示區會出現如下圖,

• 程式碼驗證有錯,訊息顯示區會出現以下畫面

9. 接著上傳於 YUN 板子,

有線傳輸上傳

• 上傳成功訊息顯示區會呈現 如下圖

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 10

NO.編號 REV 版次

A

KUAS 國立高雄應用科技大學

本資料僅提供實驗室內部使用,非經許可,本資料亦不准複印,複製或轉變成任何其他形式使用。

The information is provided and used within laboratory only and shall not be distributed, reproduced,

or disclosed in whole or in part without prior written permission.

無線傳輸上傳

• 先輸入 password - Arduino,才能傳輸程式

• 上傳成功訊息顯示區會呈現 如下圖

• 如果並未連接到 YUN 板子,訊息顯示區會出現以下畫面

DOC TITLE 文件名稱:

Arduino YUN 操作說明書

Arduino YUN Operation Manual

PAGE 頁次 11

NO.編號 REV 版次

A