Tham khảo tài liệu 'wireless sensor networks application centric design part 6', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Wireless Sensor Network for Ambient Assisted Living 139 ntx Intx t1 ti t 3 t4 Ì5Ì6 t Fig. 6. Composite interruption chronogram tgt9 t Sensor Data Monitoring Inside the sensor node the microcontroller and the radio transceiver work in power save mode most of the time. When a state change happens in the sensors an event has happened an external interrupt wakes the microcontroller and the sensing process starts. The sensing is made following the next sequence first the external interrupt which has fired the exception is disabled for a 5 seconds interval to save energy by preventing the same sensor firing continuously without relevant information. This is achieved by starting a 5 seconds timer which we call the interrupt timer when this timer is fired the external interrupt is rearmed. For it there is a fist of taking the data the global interrupt bit is disabled until the data has been captured and the message has been sent. Third the digital input is read using the TinyOS GPIO management features. Fourth battery level and temperature are read. The battery level and temperature readings are made using routines based on TinyOS ADC library. At last a message is sent using the similar TinyOS routines. In this way the message is sent to the sensor parent in the mesh. The external led of the multisensor board is powered on when the sending routine is started and powered off when the sending process is finished. This external led can be disabled via software in order to save battery power. As an example an events chronogram driven for interruption is shown in Figure 6 where next thresholds was established ti ti 125 ms t3 ti 5 s t4 ti 5 s t5 ti 5 s t6 t5 1 ms t t6 125 ms tg t6 5 s and t9 tg 1 ms. Figure 6 can be descripted as follows at t1 an external interrupt Intx has occurred due to a change in a sensor. The external interrupt Intx is disabled and the interrupt timer started. The sensor data is taken. The message is sent and the external led of our multisensor board .