Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University Practice 5~6 : 온도 및 습도 센서 제어 및 적외선 센서 제어 (ZigbeX.

Slides:



Advertisements
Similar presentations
NesC Prepared for the Multimedia Networks Group University of Virginia.
Advertisements

1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
MUC Coursework ● Deadline: 16 April ● Add all files to a folder, and send a compressed version of the folder (.zip or.tar) to by 26.
1 Lab4 Objectives  Learn to read light sensor data from sensor board  Learn to transmit a message containing the sensed data  through Mote serial port.
Mote Programming. 如何 compile 程式  make [re]install. : desired device address : target platform  install vs. reinstall install : compile the application.
TinyOS Tutorial Communication Networks I Wenyuan Xu Fall 2006.
GIIS’07 – Marrakech 3 rd July 2007 Behavioural Specification of Wireless Sensor Network Applications Nelson S Rosa and Paulo R F Cunha Universidade Federal.
Programming Motes A TinyOS and TOSSIM Tutorial By: Brent Rood.
1 TinyOS Network Communication Computer Network Programming Wenyuan Xu Fall 2007.
Development of a Mica2 Mote Sensor Network Cliff Macklin Bill Ehrbar December 8, 2004 University of Colorado, Colorado Springs.
2008EECS Embedded Network Programming nesC, TinyOS, Networking, Microcontrollers Jonathan Hui University of California, Berkeley.
TinyOS Tutorial CS580S Sensor Networks and Systems February 7, 2007 Jisu Oh Dept. of Computer Science SUNY-Binghamton.
PtinyOS: Simulating TinyOS in Ptolemy II Elaine Cheong Dec 10, 2004 EE290N Project Presentation (Initial NC code generator by Yang Zhao and Edward Lee)
5/5/2003MobiSys 2003 Tutorial TinyOS Tutorial, Part II Robert Szewczyk, Joe Polastre, Phil Levis, David Culler Mobisys 2003.
NesC: 1.1 Bumps and Future Directions David Gay, Intel Research, Berkeley (and the nesC and TinyOS teams)
1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
TinyOS Tutorial Based on Wenyuan Xu’s slides ( NetsF06/Comnet_TinyOS_Tutorial_xwy.ppt)
1 Software Development Infrastructure for Sensor Networks  Operating systems ( TinyOS )  Resource (device) management  Basic primitives  Protocols.
TinyOS Tutorial Jianping Wang (merge several tutorials found online)
Feb 2007WSN Training: XMesh Services1 Lab6 Objectives:  Route Control Interface  Understand XMesh transport services 1.Upstream 2.Upstream with end-to-end.
Sown Code Report: Aggregation Tracking Group Management Pascal A. Vicaire University of Virginia
1 Lab 5 Objectives  Use XMesh multi-hop networking service to send sensing data to a base station  Using XServe to display the sensor data message on.
Programming in nesC (and TOSSIM)
By: R Jayampathi Sampath
1 System Architecture Directions for Networked Sensors (TinyOS & Mica2) Presented by Jang Young, Kim (Chris)
April 15, 2005TinyOS: A Component Based OSPage 1 of 27 TinyOS A Component-Based Operating System for Networked Embedded Systems Tom Bush Graduate College.
1 TinyOS Computer Network Programming Wenyuan Xu Fall 2007.
TinyOS 1/2 Onsystech Sangjae Han.
1 Lab2 Objectives  Basics of TinyOS  Basics of nesC programming language.
1 Lab2 Objectives  Basics of TinyOS  Basics of nesC programming language.
Tmote Sky Doug Schultz for FWLUG (Fort Wayne Linux Users Group)
HW2: Q&A Oct. 02, Lab Machine TinyOS is installed in one machine (531AB). But, you have to bring your kit. There is a sign up sheet. Please sign.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Light Sense Lab. Read data from light(photo diode) sensor, display using oscilloscope.
An Introduction to nesC and TinyOS, or, A really complicated way to build very simple applications CENS Summer Internship 07/08/05 Ben Greenstein –
CIS 798 Sensor Network Implementation. Goals Learning sensor network programming with Crossbow motes Implement reasonable sized sensor applications Develop.
Lab 3 Introduction to TinyOS and nesC How to debug programs at PC Examples –Blink Timer –Blink –Hellow World Reference: 1.x/doc/tutorial/lesson1.html.
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
TinyOS Tutorial Lesson 8 Data logging application.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 TinyOS & NesC.
Part 2 TinyOS and nesC Programming Selected slides from:
Feb 2007WSN Training: Creating a Simple Sensor Application1 A TinyOS Sensor Application called MyApp Objectives  How to create a simple Mote firmware.
MSSL (Management System for Sensibility Lighting) - 감성조명관리시스템 - 호남대학교 정보통신공학과 X-Mode 배문희 (06 학번 3 학년 )
Prototyping with PIC Microcontroller Third day: Communications 2009/02/13 Youmin Kim Digital Media Lab.
Feb 2007WSN Training: XMesh Services1 Lab6 Objectives:  Route Control Interface  Understand XMesh transport services 1.Upstream 2.Upstream with end-to-end.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Wireless MAC Practice (MAC I)
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
Lecture 5 Sensing 石致豪. Introduction Sense application SenseAppC.nc configuration SenseAppC { } implementation { components SenseC, MainC, LedsC, new.
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
HANBACK ELECTRONICS CO., LTD. TinyOS 구조와 스케줄러의 이해 ㈜한백전자 이철희.
Ubiquitous Computing Practice - Part 4(RSSI) - Laboratory of Intelligent KUT ( Yong-hwan Kim Spring.
Lab 3, Part 2 Selected slides from: Wireless Sensor Networks Hardware/Software Tiny OS & NesC Programming borrowed from Turgay Korkmaz.
TinyOS Sandeep Gupta. Operating System (OS) What is an OS? Main functions  Process management  Memory management  Resource management Traditional OSs.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Gossiping Protocol.
TinyOS By Valliappan Annamalai. Hardware Mica motes (Mica2 and Mica2Dot) Hardware –Radio –Microcontroller –Flash memory –ADC –Sensor Board (MTA310)
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Lab1: LED Control ZigbeX mote has Red, Yellow, Green LED. This lab using LED control component provided by TinyOS.
Based on slides from Andreas Larsson Table from CY Chong, SP Kumar, BA Hamilton - Proceedings of the IEEE, 2003.
HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 HelloWorld By using LED & Timer components, we will display “helloworld” in a manner of Morse code.
Blink Blink.nc configuration Blink { } implementation { components Main, BlinkM, SingleTimer, LedsC; Main.StdControl -> BlinkM.StdControl; Main.StdControl.
Feb 2007WSN Training: XMesh Enabled Sensor App1 Lab 5 Objectives  Use XMesh multi-hop networking service to send sensing data to a base station  Using.
Cyber-Physical Programming
Why does it need? [USN] ( 주 ) 한백전자 Background Wireless Sensor Network (WSN)  Relationship between Sensor and WSN Individual sensors are very limited.
TinyOS Sandeep Gupta. TinyOS basics TinyOS is  Single tasking OS  Interrupt driven Written using a Component based language A set of components put.
Simulation of Distributed Application and Protocols using TOSSIM
WSN Training: XMesh Enabled Sensor App
Ad Hoc Networking using Flooding protocol
SOWN Code Review Top-level Control.
An Introduction to nesC
Temperature and Humidity Lab.
WSN Training: TinyOS/nesC Basic Concepts TinyOS and nesC
SenseToRfm SenseToInt.Timer -> TimerC; configuration SenseToRfm {
Presentation transcript:

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University Practice 5~6 : 온도 및 습도 센서 제어 및 적외선 센서 제어 (ZigbeX 를 이용한 유비쿼터스 센서 네트워크 시스템 ) Embedded System Lab. HyounSoo. Kim

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 1 / 18ContentsContents 1 Practice 5 : 온도 및 습도 제어 ① ZigbeX 의 온도 및 습도 센서 ② 예제를 이용한 습도값 측정 ③ OscilloscopeSHT11 예제 실습 2 Practice 6 : 적외선 센서 제어 (RF 통신 ) ① ZigbeX 의 적외선 센서 ② 예제릍 통한 적외선 측정 및 RF 무선 통신 실습 ③ OscilloscopeUltraredRF 예제 실습

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 2 / Practice 5 : 온도 및 습도 제어 개요 ZigbeX 에서 SHT11 센서를 이용하여 온도 및 습도값을 측정하고, 그 결과를 시리얼 통신을 통해 PC 로 전달하여 보자 온ㆍ습도 센서와 CPU 의 인터페이스 ① ZigbeX 의 온도 및 습도 센서

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 3 / Practice 5 : 온도 및 습도 제어 습도값 센싱 과정 ① 전송 시작을 알린다. ② μC 가 해야할 명령을 주소와 함께 전송한다. ③ SHT11 에서 측정한 값을 μC 로 전송한다. ④ 전송된 data 와 CRC 를 통해 ack 전송 여부 결정 ( 데이터를 읽을 수 없을 경우 SHT11 과의 접속을 리셋 ) ① ZigbeX 의 온도 및 습도 센서

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 4 / Practice 5 : 온도 및 습도 제어 온도 및 습도 제어 컴포넌트 ADCC 인터페이스에서 제공하는 함수들 ① ZigbeX 의 온도 및 습도 센서 습도값 얻기 Humidity.getData() – 앞에서 설정된 ADC 포트로부터 측정된 값을 얻기 위해 호출된다. event Humidity.dataReday(uint16_t data) – ADC 가 측정한 값을 event 형태로 반환한다. Humidity.getData() – 앞에서 설정된 ADC 포트로부터 측정된 값을 얻기 위해 호출된다. event Humidity.dataReday(uint16_t data) – ADC 가 측정한 값을 event 형태로 반환한다. 온도값 얻기 Temperature.getData() – 앞에서 설정된 ADC 포트로부터 측정된 값을 얻기 위해 호출된다. event Temperature.dataReady(uint16_t data) – ADC 가 측정한 값을 event 형태로 반환한다 Temperature.getData() – 앞에서 설정된 ADC 포트로부터 측정된 값을 얻기 위해 호출된다. event Temperature.dataReady(uint16_t data) – ADC 가 측정한 값을 event 형태로 반환한다 함수 및 내용

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 5 / Practice 5 : 온도 및 습도 제어 OscilloscopeSHT11 예제 설명 8Hz 마다 HumidityC 컴포넌트를 통해 습도 센서로부터 값 측정 후, 시리얼 케이블을 통해 받은 데이터를 PC 로 전달 및 LED Toggle Oscilloscope.nc ② 예제를 이용한 습도값 측정 configuration Oscilloscope { } Implementation { components Main, OscilloscopeM, TimerC, LedsC, HumidityC as SHT11, UARTComm as Comm; Main.StdControl  OscilloscopeM; Main.StdControl  TimerC; OscilloscopeM.Timer  TimerC.Timer[unique("Timer")]; OscilloscopeM.Leds  LedsC; OscilloscopeM.SHT11_Humidity  SHT11.Humidity; OscilloscopeM.SHT11_Temp  SHT11.Temperature; OscilloscopeM.SHT11_Humidity_Error  SHT11.HumidityError; OscilloscopeM.SHT11_Temp_Error  SHT11.TemperatureError; OscilloscopeM.SplitControl  SHT11.SplitControl; OscilloscopeM.CommControl  Comm; OscilloscopeM.ResetCounterMsg  Comm.ReceiveMsg[AM_OSCOPERESETMSG]; OscilloscopeM.DataMsg  Comm.SendMsg[AM_OSCOPEMSG]; } 1 8Hz 2 Humidity Data 3 UART Send

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 6 / Practice 5 : 온도 및 습도 제어 ② 예제를 이용한 습도값 측정 includes OscopeMsg; module OscilloscopeM { provides interface StdControl; uses { interface Timer; interface Leds; interface StdControl as SensorControl; interface ADC as SHT11_Humidity; interface ADC as SHT11_Temp; interface ADCError as SHT11_Humidity_Error; interface ADCError as SHT11_Temp_Error; interface StdControl as CommControl; interface SendMsg as DataMsg; interface ReceiveMsg as ResetCounterMsg; interface SplitControl; } Implementation { uint8_t TemppacketReadingNumber; uint8_t HumipacketReadingNumber; uint16_t TempreadingNumber; uint16_t HumireadingNumber; TOS_Msg tempmsg[2]; TOS_Msg humimsg[2]; uint8_t currentTempMsg; uint8_t currentHumiMsg; uint16_t timetick; uint8_t mytemp, myhumi; … Implementation command result_t StdControl.init() { call Leds.init(); call Leds.yellowOff(); call Leds.redOff(); call Leds.greenOff(); // turn on the sensors so that they can be read. // call SensorControl.init(); call CommControl.init(); call SplitControl.init(); atomic { currentTempMsg = 0; currentHumiMsg = 0; TemppacketReadingNumber = 0; HumipacketReadingNumber = 0; TempreadingNumber = 0; HumireadingNumber = 0; } dbg(DBG_BOOT, "OSCOPE initialized\n"); return SUCCESS; } command result_t StdControl.start() { // call SensorControl.start(); call Timer.start(TIMER_REPEAT, 125); call CommControl.start(); call SplitControl.start(); return SUCCESS; }

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 7 / Practice 5 : 온도 및 습도 제어 ② 예제를 이용한 습도값 측정 … Implementation command result_t StdControl.stop() { // call SensorControl.stop(); call Timer.stop(); call CommControl.stop(); call SplitControl.stop(); return SUCCESS; } event result_t Timer.fired() { timetick++; // return call SHT11_Temp.getData(); return call SHT11_Humidity.getData(); } event TOS_MsgPtr ResetCounterMsg.receive(TOS_MsgPtr m) { atomic { TempreadingNumber = 0; HumireadingNumber = 0; } return m; }

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 8 / Practice 5 : 온도 및 습도 제어 ② 예제를 이용한 습도값 측정 … Implementation async event result_t SHT11_Humidity.dataReady(uint16_t data) { struct OscopeMsg *pack; atomic { pack = (struct OscopeMsg *)humimsg[currentTempMsg].data; calc_SHT11(data,data);pack->data[HumipacketReadingNumber++] = myhumi; HumireadingNumber++;dbg(DBG_USR1, "data_event\n"); if (HumipacketReadingNumber == BUFFER_SIZE) {post dataTaskHumi(); } } if (data > 0x0300) call Leds.redOn(); else call Leds.redOff(); return SUCCESS; } task void dataTaskHumi() { struct OscopeMsg *pack; atomic { pack = (struct OscopeMsg *)humimsg[currentHumiMsg].data; HumipacketReadingNumber = 0; pack  lastSampleNumber = HumireadingNumber; } pack  channel = 2;pack  sourceMoteID = TOS_LOCAL_ADDRESS; if (call DataMsg.send(TOS_UART_ADDR, sizeof(struct OscopeMsg), &humimsg[currentHumiMsg])) { atomic { currentHumiMsg ^= 0x1; } call Leds.yellowToggle(); } 잘못된 부분 currentHumiMsg 가 들어가야 하는 부분 이렇게 그대로 사용시 currentTempMsg 가 0 으로 고정되어 있으므로 데이터는 습도가 저장될 TOS_Msg 버퍼의 0 번째 부분에만 계속 기록되고, 1 번째 부분의 버퍼에는 기록을 하지 않게 되므로 0 이라는 값이 오실로스코프에 찍히게 됨

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 9 / Practice 5 : 온도 및 습도 제어 ② 예제를 이용한 습도값 측정 … Implementation void calc_SHT11(uint16_t p_humidity,uint16_t p_temperature) { // // calculates temperature [ ℃ ] and humidity [%RH] // input : humi [Ticks] (12 bit) // temp [Ticks] (14 bit) // output: humi [%RH] // temp [ ℃ ] const float C1=-4.0; // for 12 Bit const float C2= ; // for 12 Bit const float C3= ; // for 12 Bit const float T1=0.01; // for 14 5V const float T2= ; // for 14 5V float rh_lin; // rh_lin: Humidity linear float rh_true; // rh_true: Temperature compensated humidity float t_C; // t_C : Temperature [ ℃ ] float rh=(float)p_humidity; // rh: Humidity [Ticks] 12 Bit float t=(float)p_temperature; // t: Temperature [Ticks] 14 Bit t_C=t* ; // calc. Temperature from ticks to [ ℃ ] rh_lin=C3*rh*rh + C2*rh + C1; // calc. Humidity from ticks to [%RH] rh_true=(t_C-25)*(T1+T2*rh)+rh_lin; // calc. Temperature compensated humidity [%RH] if(rh_true>100)rh_true=100; // cut if the value is outside of if(rh_true<0.1)rh_true=0.1; // the physical possible range mytemp=(uint8_t)t_C; // return temperature [ ℃ ] myhumi=(uint8_t)rh_true; // return humidity[%RH] }

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 10 / Practice 5 : 온도 및 습도 제어 Build cd /opt/tinyos-1.x/contrib/zigbex/OscilloscopeSHT11 make zigbex./build/zigbex/main.exe 포팅 (PonyProg - parallel) Java 어플리케이션 구동 (serial)  export  cdjava (  cd /opt/tinyos-1.x/tools/java)  java net.tinyos.oscope.oscilloscope ③ OscilloscopeSHT11 예제 실습 잘못된 부분 8 페이지에서 언급한 Flag 값을 Humi 로 바꿔주면, 정상적으로 이어지는 형태의 곡선을 볼 수 있음.

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 11 / Practice 6 : 적외선 센서 제어 (RF 통신 ) 개요 ZigbeX 에서 BS520 적외선 센서를 이용하여 주변의 적외선을 측정하고, 그 결과를 RF 무선 통신을 통해 전송해 보자 ADCC 인터페이스에서 제공하는 함수들 ADCControl.bindPort(TOS_ADC_Ultrared_PORT, TOSH_ACTUAL_Ultrared_Port) 함수를 호출하여 ADC1 에 들어오는 적외선 측정값을 받을 수 있도록 설정한다. ① ZigbeX 의 적외선 센서 특정 ADC 포트 지정 특정 ADC 포트 지정 ADCControl.bindPort( ) – 원하는 ADC 포트값을 설정한다. (ADC 1 번포트는 조도 센서와 연결되어 있음 ) ADC 의 값 얻기 얻기 ADC.getData() – 앞에서 설정된 ADC 포트로부터 측정된 값을 얻기 위해 호출된다. event ADC.dataReady(uint16_t data) – ADC 가 측정한 값을 event 형태로 반환한다 ADC.getData() – 앞에서 설정된 ADC 포트로부터 측정된 값을 얻기 위해 호출된다. event ADC.dataReady(uint16_t data) – ADC 가 측정한 값을 event 형태로 반환한다 함수 및 내용

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 12 / Practice 6 : 적외선 센서 제어 (RF 통신 ) OscilloscopeUltraredRF 예제 설명 ZegbeX 1 번 노드에서는 8Hz 마다 적외선 값을 RF 무선 통신을 통해 주위로 브로드캐스팅 한다 그 측정값을 RF 통신을 통해 받는 ZigbeX 0 번 노드는 자신에게 프로그램된 TOSBase 프로그램에 의해 값을 시리얼로 연결된 PC 에게 전송한다. 구성도 ② 예제릍 통한 적외선 측정 및 RF 무선 통신 실습 ZigbeX 1 ZigbeX 0 OsilloscopeUltraredRFTOSBase 무선통신 시리얼 케이블

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 13 / Practice 6 : 적외선 센서 제어 (RF 통신 ) OscilloscopeUltraredRF configuration ② 예제릍 통한 적외선 측정 및 RF 무선 통신 실습 includes OscopeMsg; configuration Oscilloscope { } Implementation { components Main, OscilloscopeM, TimerC, LedsC, Ultrared as Sensor, UARTComm as Comm; Main.StdControl  OscilloscopeM; Main.StdControl  TimerC; OscilloscopeM.Timer  TimerC.Timer[unique("Timer")]; OscilloscopeM.Leds  LedsC; OscilloscopeM.SensorControl  Sensor; OscilloscopeM.ADC  Sensor; OscilloscopeM.CommControl  Comm; OscilloscopeM.ResetCounterMsg  Comm.ReceiveMsg[AM_OSCOPERESETMSG]; OscilloscopeM.DataMsg  Comm.SendMsg[AM_OSCOPEMSG]; }

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 14 / Practice 6 : 적외선 센서 제어 (RF 통신 ) includes OscopeMsg; module OscilloscopeM { provides interface StdControl; uses { interface Timer; interface Leds; interface StdControl as SensorControl; interface ADC; interface StdControl as CommControl; interface SendMsg as DataMsg; interface ReceiveMsg as ResetCounterMsg; } Implementation { uint8_t packetReadingNumber; uint16_t readingNumber; TOS_Msg msg[2]; uint8_t currentMsg; command result_t StdControl.init() { call Leds.init();call Leds.yellowOff();call Leds.redOff();call Leds.greenOff(); call SensorControl.init(); call CommControl.init(); atomic { currentMsg = 0;packetReadingNumber = 0;readingNumber = 0; } dbg(DBG_BOOT, "OSCOPE initialized\n"); return SUCCESS; } ② 예제릍 통한 적외선 측정 및 RF 무선 통신 실습

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 15 / 18 … Implementation command result_t StdControl.start() { call SensorControl.start(); call Timer.start(TIMER_REPEAT, 125); call CommControl.start(); return SUCCESS; } command result_t StdControl.stop() { call SensorControl.stop(); call Timer.stop(); call CommControl.stop(); return SUCCESS; } event result_t Timer.fired() { return call ADC.getData(); } async event result_t ADC.dataReady(uint16_t data) { struct OscopeMsg *pack; atomic { pack = (struct OscopeMsg *)msg[currentMsg].data; pack  data[packetReadingNumber++] = data; readingNumber++; dbg(DBG_USR1, "data_event\n"); if (packetReadingNumber == BUFFER_SIZE) {// BUFFER_SIZE = 10  OscopeMsg.h post dataTask(); } if (data > 0x0300) call Leds.redOn(); else call Leds.redOff(); return SUCCESS; } 2. Practice 6 : 적외선 센서 제어 (RF 통신 ) ② 예제릍 통한 적외선 측정 및 RF 무선 통신 실습

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 16 / Practice 6 : 적외선 센서 제어 (RF 통신 ) … Implementation task void dataTask() { struct OscopeMsg *pack; atomic { pack = (struct OscopeMsg *)msg[currentMsg].data; packetReadingNumber = 0; pack  lastSampleNumber = readingNumber; } pack  channel = 1; pack  sourceMoteID = TOS_LOCAL_ADDRESS; if (call DataMsg.send(TOS_BCAST_ADDR, sizeof(struct OscopeMsg), &msg[currentMsg])) { atomic { currentMsg ^= 0x1; } call Leds.yellowToggle(); } event result_t DataMsg.sendDone(TOS_MsgPtr sent, result_t success) { return SUCCESS; } event TOS_MsgPtr ResetCounterMsg.receive(TOS_MsgPtr m) { atomic { readingNumber = 0; } return m; } ② 예제릍 통한 적외선 측정 및 RF 무선 통신 실습

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 17 / Practice 6 : 적외선 센서 제어 (RF 통신 ) ZigbeX mote 1 Build cd /opt/tinyos-1.x/contrib/zigbex/OscilloscopeUltraredRF TOSBase 와의 통신을 위해서 TOSBase 의 그룹 아이디와 통일 make zigbex ./build/zigbex/main.exe 포팅 (PonyProg - parallel) ZigbeX mote 2 Build cd /opt/tinyos-1.x/contrib/zigbex/TOSBase make zigbex ./build/zigbex/main.exe 포팅  export  cdjava (  cd /opt/tinyos-1.x/tools/java)  java net.tinyos.oscope.oscilloscope ③ OscilloscopeUltraredRF 예제 실습 COMPONENT=OscilloscopePFLAGS=-I../Oscilloscope DEFAULT_LOCAL_GROUP=0x7dInclude../../../apps/Makerules

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University 18 / Practice 6 : 적외선 센서 제어 (RF 통신 ) 결과 ③ OscilloscopeUltraredRF 예제 실습 적외선 감지 시작 ( 건물내부 ) 창문을 통한 적외선량 측정 외부에서 직접 측정 형광등 측정 휴대폰 적외선 감지 ( 포트 호환 X) 한손으로 가림 두손으로 가림

Presentation by HyounSoo. Kim Embedded System Lab ChungBuk National University E N D