TinyOS ??? ? nesC Programming - PowerPoint PPT Presentation

1 / 85
About This Presentation
Title:

TinyOS ??? ? nesC Programming

Description:

TinyOS nesC Programming (USN ) ( ) ED TinyOS TinyOS TinyOS TinyOS TinyOS TinyOS ... – PowerPoint PPT presentation

Number of Views:134
Avg rating:3.0/5.0
Slides: 86
Provided by: 6649313
Category:

less

Transcript and Presenter's Notes

Title: TinyOS ??? ? nesC Programming


1
TinyOS ??? ? nesC Programming (USN ?? ?? ??)
(?) ED
2
?? ??
1
TinyOS? ??
2
TinyOS? ??
3
TinyOS Programming Environment Setting
4
TinyOS Programming
Lesson 1
Blink LEDs
Lesson 2
Sensor Acquisition
Lesson 3
Task Programming
Lesson 4
Send Receive Message using RF
Lesson 5
How to debug
Lesson 6
Data Display on PC
Lesson 7
Command to node Broadcasting
Lesson 8
Saving data
3
TinyOs? ??
USN??? USN?? ???? ??? ??? ??? ???? ??? ??, ??, ??? ???? ?? ???? ?? ????? ??? ????? ???. ?? ?? ??? ?? Zigbee ??? ?? ????? ?? ??? ?? ??? ???? ??? ?? ??? ? ?? ???. ? ? ??(?? ??)? ???? ??? ??? ????? ?? RFID ??? ?? ??, ?????? ?? ???? ??? ??? ?? ??? ?? ??. ???? ?? USN? ?? ?? ???? ????? ??? ????? ??? ???? ???? ?? ?? ???? RFID? USN? ????? ??? ????? ??, ???? ??? ?????? ?? ????? ????? ?? ??. ???? 2010??? ? ??? 3?994??(?? 2?974??)? ?? ?? ?? ???? ?? ???????? ? 2?4?634?? RFID/USN ????? ??? ????.
4
TinyOS? ??
5
TinyOS? ??
6
TinyOS? ??
7
TinyOS? ??
8
TinyOS? ??
9
TinyOS? ??
Download
Windows ??
http//www.tinyos.net ???? ??
10
TinyOS? ??
http//www.tinyos.net/dist-1.1.0/tinyos/windows/?
type.
11
TinyOS? ??
Tinyos-1.1.11-3is.exe ? ??????.
12
TinyOS? ??
?????? ??
??? ??
???? ??
13
TinyOS? ??
Next
Next
14
TinyOS? ??
Cygwin ??? ??? TinyOS? ????.
Continue
15
TinyOS? ??
?? ?? ??? ??? ?? ?? ???? ??.
16
TinyOS? ??
??? ???? ????? ???? ????,
?? ??? ??? ?? ????.
Windows Explorer?? ???? Program Files ??? ?? UCB
??? ???? ??.
17
TinyOS? ??
TinyOS ?? ??
????? Cygwin ????? ????.
18
TinyOS? ??
AVR Studio? ?? (Download? ??)
Astudio????.
www.atmel.com ? ????.
AVR Studio 4.12(build 460)? ????.
19
TinyOS? ??
AVR Studio? ?? (Download? ??)
Next
I agree? Next
Next
20
TinyOS? ??
AVR Studio? ?? (Download? ??)
Next
21
TinyOS Programming Environment Setting
ED-ZigNet Porting
??? USN? ??? ???? ?? ???? ??? ?? ?? USN ???? ????
??. ? ???? Line-Up? ?? ??? ??.
MoteĀ  Name ?? Clock CPU Flash (Code KB) RAM (KB) Radio (kBaud) Radio Type
WeC 1999 4MHz Atmel 8 0.5 10 RFM
RENE 2000 4MHz Atmel 8 0.5 10 RFM
DOT 2001 4MHz Atmel 16 1 10 RFM
MCA 2002 4MHz Atmel 128 4 40 RFM
MICA2 2003 7MHz Atmel 128 4 40 ChipĀ  Con
iMote 2003 12MHz ARM 512 64 460 Zeevo Con
btNode 2003 12MHz Atmel 128 4 460 Enicsson BT
Telos 2004 20MHz Motorola 60 4 250 ZigBee
MICAz 2004 7MHz Atmel 128 4 250 ZigBee
22
TinyOS Programming Environment Setting
ED-ZigNet Porting
??? ?? USN Platform?? ?????. ? ? ED-ZigNet? ??
??? ??? Micaz Platform? ???? ??. ??? platform?
????? ?? ????, Microprocessor ?? ????? ?? ???.
??? Microprocessor ??? CC2420 chip(ZigBee Chip)?
?????? Sensor? ?? ?? Micaz? ???. ???
ED-ZigNet?? Porting? ??? ???. ??? porting ???
Hardware? ??? ??????? ???? ??? ? ? ??. ??? ???
???? ????, ?? ??? CD? TinyOS ??? ??????
ED-ZigNet? Porting ??? ??? ??.
23
TinyOS Programming Environment Setting
ED-ZigNet Porting
24
TinyOS Programming Environment Setting
ED-ZigNet Porting
TinyOS ??? ????.(C\Porgram Files\UCB\Cygwin\opt\)
25
TinyOS Programming Environment Setting
ED-ZigNet Porting
?? ?(A)
26
TinyOS Programming - 1
Lesson 1 Blink LEDs
Blink LEDs
?? ??? ????? ?? ?? ?? ?? ??? ? ????. ??? ?,???
???? ??? ?? ????. ED-ZigNet?? ????? ? ?? LED?
??? ??. ?? ?? LED? ????? ????? ??? ??? ??.
27
TinyOS Programming - 1
Lesson 1 Blink LEDs
Program Coding
Windows Explorer? ???? C\Program
Files\UCB\Cygwin\opt\tinyos-1.x\apps\ZigNet1\Blink
? ????.
28
TinyOS Programming - 1
Lesson 1 Blink LEDs
Blink? Configurature ??
Blink? Module ??
Blink.nc BlinkM.nc SingleTimer.nc??? ??
29
TinyOS Programming - 1
Lesson 1 Blink LEDs
Ultra Editor? ???? ???? ??? open??. ??? source?
????. Source ??? Text Editor? ????
????. Notepad? ???? ??? open? ?? source? Linux
???? ??? ???? ?? ?? ??. Text Editor tools?
????? ????.
30
TinyOS Programming - 1
Lesson 1 Blink LEDs
Compile
????? Cygwin ???? ????. (??-Program-Cygwin-Cygwin
Bash Shell)
31
TinyOS Programming - 1
Lesson 1 Blink LEDs
Compile
Blink ??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/
Blink/
32
TinyOS Programming - 1
Lesson 1 Blink LEDs
Compile
??? ??. make micaz
33
TinyOS Programming - 1
Lesson 1 Blink LEDs
Download
??? Compile ? ???? ????. cd build/micaz
??? ????.
??? ??? Display??.
???? ??? ? ???? ?????.
??? ED-ZigNet? ???? ? ??? main.ihex????.
34
TinyOS Programming - 1
Lesson 1 Blink LEDs
Download
AVR Studio? ????.
35
TinyOS Programming - 1
Lesson 1 Blink LEDs
Download
Tools - Program AVR Connect ? ????.
36
TinyOS Programming - 1
Lesson 1 Blink LEDs
Download
Programmer Device? ????.
Device? ??? Com PORT? ????. ????? Auto? ????
JTAG ICE
37
TinyOS Programming - 1
Lesson 1 Blink LEDs
Download
Device? ????. ATmega128
Flash ? ? ???
38
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Sensor Acquisition
??? Lesson 1?? LED? ???? ?? ?? ?????. ?? ?????
??? ??? ????? ??? ?? ????? ??. S/W? ??? ???? ???
???? USN?? ???? ?? ??? ?????. ???? ?????????
???? ?? ???? ??? 0 ?? 1? ??? ??? ?? ? ? ??. ????
cds? ??? ?? ?? ???? LED? ??? Display?? ??? ??
????.
39
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Program Coding
Windows Explorer? ???? C\Program
Files\UCB\Cygwin\opt\tinyos-1.x\apps\ZigNet1\Sense
? ????.
40
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Program Coding
Sense? Configurature ??
Sense? Module ??
41
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Compile
????? Cygwin ???? ????. (??-Program-Cygwin-Cygwin
Bash Shell)
??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/Sense
42
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Compile
make micaz ? ????.
43
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Compile
Compile? ????.
Build/micaz ??? ????.
??? ????.
Main.ihex ??? ????
44
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Download
AVR Studio? ????.
45
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Download
Tools - Program AVR Connect ? ????.
46
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Download
Programmer Device? ????.
Device? ??? Com PORT? ????. ????? Auto? ????
JTAG ICE
47
TinyOS Programming - 2
Lesson 2 Sensor Acquisition
Download
Device? ????. ATmega128
Flash ? ? ???
48
TinyOS Programming - 3
Lesson 3 Task Programming
Task Programming
??? Lesson 2?? cds? ?? ??? ???? LED? ????
Display?? ??? ?? ?????. ? ??? ??? ?? ??? ???? ??
Display?? ????. ? ????? Event? ?? ? ?? ??? ??
????. ?? Lesson 3??? ??? ??? ??. ?? ?????
Event? ?? ?? ???? ?? ??? Timer? ?? ?? ???? ????
??? Display?? ??? ????? ??. ??? ?? Task??.
49
TinyOS Programming - 3
Lesson 3 Task Programming
Program Coding
Windows Explorer? ???? \opt\tinyos-1.x\apps\Zi
gNet1\Sensetask ? ????.
Sense Task? Module??
Sense Task? Configuration??
50
TinyOS Programming - 3
Lesson 3 Task Programming
Compile
????? Cygwin ???? ????. (??-Program-Cygwin-Cygwin
Bash Shell)
??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/SenseTa
sk
51
TinyOS Programming - 3
Lesson 3 Task Programming
Compile
??? ????
Compile??.
52
TinyOS Programming - 3
Lesson 3 Task Programming
Compile
Compile
Compile? ????.
Build/micaz ??? ????.
??? ????.
Main.ihex ??? ????
53
TinyOS Programming - 3
Lesson 3 Task Programming
Download
AVR Studio? ????.
54
TinyOS Programming - 3
Lesson 3 Task Programming
Download
Tools - Program AVR Connect ? ????.
55
TinyOS Programming - 3
Lesson 3 Task Programming
Download
Programmer Device? ????.
Device? ??? Com PORT? ????. ????? Auto? ????
JTAG ICE
56
TinyOS Programming - 3
Lesson 3 Task Programming
Download
Device? ????. ATmega128
Flash ? ? ???
57
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Send Receive Message Using RF
??? Lesson 3?? ????? ??? ?? ?? LED? ?? ???? ??
?? ?????. ?? ??????? ??? ?? RF(Radio Frequency)?
?? ????? ??. RF? ?? ??? ????, ??? ?? ??? LED?
display?? ??? ??? ??. ????? ??? ?(Transmission)?
?? ?(Receive)? ? ?? Programming ? ????.
58
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Program Coding - Transmission
Windows Explorer? ???? \opt\tinyos-1.x\apps\Zi
gNet1\CntToLedsAndRfm ? ????.
CntToLedsAndRfm? Configuration Module ??
59
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Compile - Transmission
????? Cygwin ???? ????. (??-Program-Cygwin-Cygwin
Bash Shell)
??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/CntToLe
dsAndRfm
60
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Compile - Transmission
??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/CntToL
edsAndRfm/
????? ??? ??. ls
?????. make micaz
61
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Download - Transmission
AVR Studio? ????.
62
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Download - Transmission
Programmer Device? ????.
Device? ??? Com PORT? ????. ????? Auto? ????
JTAG ICE
63
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Download - Transmission
Device? ????. ATmega128
Flash ? ? ???
64
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Program Coding - Receive
Windows Explorer? ???? \opt\tinyos-1.x\apps\Zi
gNet1\RfmToLeds ? ????.
RfmToLeds? Configuration Module ??
65
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Compile - Receive
????? Cygwin ???? ????. (??-Program-Cygwin-Cygwin
Bash Shell)
??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/RfmToLe
ds
66
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Compile - Receive
??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/RfmToLe
ds
??? ?? ??. ls
67
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Compile - Receive
??? ??. make micaz
68
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Download - Receive
AVR Studio? ????.
69
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Download - Receive
Programmer Device? ????.
Device? ??? Com PORT? ????. ????? Auto? ????
JTAG ICE
70
TinyOS Programming - 4
Lesson 4 Send Receive Message using RF
Download - Receive
Device? ????. ATmega128
Flash ? ? ???
71
TinyOS Programming - 5
Lesson 5 How to debug
How to debug
??? Lesson 4?? ????? ??? ??? RF? ??? ? ?? ????
LED? ??? Display?? ???? ?????. ???? ???? ? ?
Source? ?? ??? ??? ???? ?????. ??? ??? TinyOS?
???? ???? ??? ? ???? ??? ??? source?? ??? ????
???. ??? ??? ??? Programming? ??
??. Programming ? node? Download?? ??? ??????
???? ???? ???. ??? ??? ??? ???? Simulation?? ???
????. Simulation? PC? ??? ???? node? ???? ? ?
??.
72
TinyOS Programming - 5
Lesson 5 How to debug
Program Coding
Windows Explorer? ???? \opt\tinyos-1.x\apps\Zi
gNet1\TestTinyViz ? ????.
73
TinyOS Programming - 5
Lesson 5 How to debug
Compile
????? Cygwin ???? ????. (??-Program-Cygwin-Cygwin
Bash Shell)
74
TinyOS Programming - 5
Lesson 5 How to debug
Compile
??? ????. cd /opt/tinyos-1.x/apps/ZigNet1/TestTi
nyViz
??? ??? ????. ls
75
TinyOS Programming - 5
Lesson 5 How to debug
Compile
????? (make micaz ? ?? make pc??) make PC
76
TinyOS Programming - 5
Lesson 5 How to debug
Compile
??? ???? ??? ????.
77
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
???? ??? Cygwin? ?? ? ??
78
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
??? Cygwin? java ??? ????. cd
/opt/tinyos-1.x/tools/java
??? sim??? ????. cd net/tinyos/sim
79
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
Java? ?????.. make
??? GUI (Graphic User Interface) debug tools?
?????. ? tinyviz? Cygwin ?????? ? ? ??? /bin ???
copy??.
80
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
Windows Explorer? ???? sim ??? ????.
Tinyviz ? ????.
81
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
Windows Explorer? ???? bin ??? ????.
??? tinyviz? ?????
?? Cygwin ????? tinyviz? ?? ?? ? ??
82
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
? ?? Cygwin ??? ??? ? TestTinyviz? ?? ????
??? ? ???? ????.
30?? node? Simulation ??. ./main.exe gui 30
83
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
? ?? Cygwin?? ???? TinyViz ??? ????.
84
TinyOS Programming - 5
Lesson 5 How to debug
Simulation
TinyViz ????? ?? ???.
85
TinyOS Programming - 5
Lesson 5 How to debug
Write a Comment
User Comments (0)
About PowerShow.com