Arduino Practice-4.1 - Laboratory of Intelligent Networks

Download Report

Transcript Arduino Practice-4.1 - Laboratory of Intelligent Networks

Ubiquitous Computing Practice
(XBee - Communication)
Youn-Hee Han, In-Seok Kang
{yhhan, iseka}@koreatech.ac.kr
Laboratory of Intelligent Networks
Advanced Technology Research Center
Korea University of Technology
http://link.koreatech.ac.kr
Contents
Introduction
XBee Module, Shield
Setting Xbee Module

X-CTU software
XBee Communication




Xbee Communication Test
Simple Example
Echo server/client
Multi Hop Communication
2 / 32
Introduction
3 / 32
Introduction
X-CTU software

This is what you need to configure the Xbee modules.
XBee modules

Series 1(802.15.4), Series 2(zigbee), DigiMesh
XBee Explorer USB, XBee Shield
4 / 32
Introduction
XBee Explorer USB

Install the firmware, changing setting
5 / 32
Introduction-XBee
XBee

These modules use the IEEE 802.15.4 networking protocol for
fast point-to-multipoint or peer-to-peer networking
Chip Antenna, Wire Antenna…
6 / 32
Introduction- XBee Shield
XBee Shield
7 / 32
Arduino board+XBee shield+XBee module
8 / 32
X-CTU program 을 이용하여 Xbee module 를 설정한다.
SETTING XBEE MODULE
9 / 32
XBee setting
coordinator
Router & end device
10 / 32
X-CTU program
11 / 32
Xbee module을 Coordinator, Router/End Device로 설정
XBEE MODULE SETTING
12 / 32
Coordinator setting
13 / 32
API
Check v
14 / 32
15 / 32
16 / 32
17 / 32
18 / 32
19 / 32
완료 후 Read 버튼 클릭 후 정보 확인
20 / 32
Router, End device


Coordinator 연결을 유지하고 설정 한다.
Coordinator 설정 후 PAN ID 값에 맞춘다.
21 / 32
Router/End device
AP = 2 로 설정 후
Write
22 / 32
Device address
Device Address
1. Serial Number High
2. Serial Number Low
23 / 32
Xbee Communication Test
Simple Example
Echo server/client
Multi Hop Communication
XBEE COMMUNICATION
24 / 32
Xbee echo server/client
Coordinator or
End Device
Coordinator or
End Device
Send Data
Response
25 / 32
Xbee Library
Download xbee Library
압축을 푼 후 Xbee 폴더를 arduino-1.0.4\libraries 폴더
에 넣는다.
26 / 32
Xbee Library (Series 2_Tx)
Download Series 2_Tx example
Upload to arduino
27 / 32
Coordinator X-CTU terminal
28 / 32
Upload Rx Code
Download serial2_rx_example.ino
And Upload to Arduino
Coordinator
End Device
29 / 32
Coordinator Serial monitor
30 / 32
도전과제
31 / 32
도전과제
Xbee 통신으로 LED를 제어하기



End Device에서 데이터를 전송하여 Coordinator에서 LED 제어하
기
Ex) “5” 라는 데이터 전송 시 5개의 LED on
Ex) “3” 라는 데이터 전송 시 3개의 LED on
온도, 조도, 습도 센서 값을 전송하기

End Device 에서 Coordinator 로 전송하기
32 / 32
Thank You
33 / 32