4
Equipment (cont’)
FT-6251• Sensor Development Board
• Temperature range• 0 ~ 70℃ ℃
• Humidity range• 0% ~ 95%
5
Experiment: Setup environment
Goal• Setup environment
• Install the development tool
• Understand the program
• Build the program
• Burn image file into Zigbee
7
Experiment: Setup environment
Jennic SDK has two development tools
• Command Line Interface (CLI)
• Integrated Development Environment (IDE)
8
Experiment: Setup environment
Install JN-SW-4031-SDK-Toolchain-v1.1.exe JN-SW-4030-SDK-Libraries-v1.4.exe
• Download from http://www.jennic.com/ “Support / software”
9
Experiment: Setup environment
Install JN-SW-4027-SDKwithCLI.msi• Download from http://www.jennic.com/
“Support / software”
10
Experiment: Setup environment
將範例程式解壓縮至C:\Jennic\cygwin\jennic\SDK\Application
Execute Code::Blocks
13
Experiment: Setup environment
Installation document• CDROM\Document\Installation\JN-UG-3035-SDK-
Installation-1v2.pdf
14
Experiment: LED Flash
Goal• Understand the program
• Modify the program• Step1: LED A flash twice, go to step2
• Step2: LED B flash twice, go to step1
15
Experiment: LED Flash
ProgramStart
AppColdStart AppWarmStart
InitSystem
While(true)
Yes
Timer?
Flag
Yes
No
LED1 onLED2 off
LED1 offLED2 on
True False
17
Experiment: LED Flash
Function library• CDROM\Documents\Board\JN-RM-2001-
Integrated-Peripherals-API-2v3.pdf
18
Experiment: Button Control LED
Goal• 在 FT625x 無線傳輸設備上學習使用按鈕的方式以控制 LED 燈號。
• Understand the program
• Modify the program• Step1: Press button A, start LED flash
• Step2: Press button B, stop LED flash
• Draft flow chart of the modified program
22
Experiment: UART Control LED
Goal• 在 FT625x 無線傳輸設備上學習可以透過
UART 通訊從設備上取得一些資訊回饋(feedback) 。
• Understand the program
• Modify the program• PC sends message through serial port to turn on\off the
LED
24
Experiment: UART Control LED
Demo
Terminal
Serial Port
FT 6250
UART
Typing in HyperTerminal:ex: aaaaabbbcc
which UART ASCII code
25
Experiment: UART Control LED
使用超級終端機,必須做相關設定如下 : 38400 bps, 8 data bits, no parity, 1 stop bit, and no handshaking.
燒錄程式到 FT-6200 無線傳輸設備後,務必先重置電源,再接上與超級終端機的連線。
26
Experiment: Wireless Control LED
Goal• 在 FT625x 無線傳輸設備上學習如何使用 RF 無線傳輸,形成小型無線網路。
• Understand program• Modify the program
• PC sends message through wireless to turn on\off the LED
• Write the difficult point down while you are experimenting
29
Experiment: Sensor
Goal• 學習如何使用 Zigbee 裝置收集週遭環境的溫度和溼度,並透過所在無線網路傳遞這些資訊
• Understand program
• Modify the program• 讓 end device 定期回報所感測到的溫溼度數據到
coordinator
• 設定溫溼度 MAX 的警告條件– 溫度警告 - LED_0 閃爍– 濕度警告 - LED_1 閃爍
請攜帶吹風機
32
Experiment: Flow Testing
Goal• 測試 Zigbee Coordinator 和 End Device 的最高傳輸速度
• 速度是否可達到 20k-250k bps ,如不行請評估原因
Devices• Zigbee
• Smartbits 600