1 / 11

Ad Hoc and Sensor Networks Exercise 4

Ad Hoc and Sensor Networks Exercise 4. Sensor Network programming. TinyOS exercise. Sensor network programming in a nutshell Read a tutorial Solve two (simple) tasks on real hardware Lab-style exercise Teams of two to three students are ideal Two parallel lab working places are available

frayne
Download Presentation

Ad Hoc and Sensor Networks Exercise 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ad Hoc and Sensor Networks Exercise 4 Sensor Network programming

  2. TinyOS exercise • Sensor network programming in a nutshell • Read a tutorial • Solve two (simple) tasks on real hardware • Lab-style exercise • Teams of two to three students are ideal • Two parallel lab working places are available • Reservation system on the course website • Expected time needed for all tasks:3-4 hours • Mandatory to get the testat without taking the exam

  3. Tutorial • Carefully read the tutorial on the TinyOS website • http://www.tinyos.net/tinyos-1.x/doc/tutorial/index.html • Ignore instructions about setting up the system, flashing applications, simulation, and data ROM access • The tutorial contains several exercise tasks: Think about them but do not write code • We use an Eclipse plug-in to develop the applications which is not mentioned in the tutorial

  4. Exercise 1 • Exchange of a sensor reading • Two sensor nodes are used for this task • One node periodically samples its light sensor and broadcasts the reading over its radio • The other node listens for radio messages and signals if it is getting brighter or darker • Brighter -> The green LED of the receiver is set • Darker -> The red LED of the receiver is set • No significant change -> The yellow LED is set What exactly do we get from the sensor?

  5. Exercise 2 • Optical Communication using Morse Codes • Sender • Sensor node connected to the pc over a serial connection • Controlled by a (provided) java application • LEDs are toggled on/off to transmit Morse signals • Receiver • Sensor node sampling its light sensor. Detects and decodes Morse signals • Connected to a pc over a serial connection. On the pc the Hyperterminal is used for output on SimpleBlinker · – A on off on off on MorseReceiver Morser.jar Hyperterminal

  6. Exercise 2 • Optical Communication using Morse Codes • Sender • Sensor node connected to the pc over a serial connection • Controlled by a (provided) java application • LEDs are toggled on/off to transmit Morse signals • Receiver • Sensor node sampling its light sensor. Detects and decodes Morse signals • Connected to a pc over a serial connection. On the pc the Hyperterminal is used for output on off on off on on off A SimpleBlinker A on off on off A off MorseReceiver Morser.jar Hyperterminal

  7. Exercise 2 • Optical Communication using Morse Codes • Sender • Sensor node connected to the pc over a serial connection • Controlled by a (provided) java application • LEDs are toggled on/off to transmit Morse signals • Receiver • Sensor node sampling its light sensor. Detects and decodes Morse signals • Connected to a pc over a serial connection. On the pc the Hyperterminal is used for output Ex 2 dumb smart smart dumb SimpleBlinker MorseReceiver Morser.jar Hyperterminal

  8. General Information • Code Skeletons for both applications are provided • Exercise 1 only needs very little additional programming and should be solved by all groups • Exercise 2 is more challenging but is also more fun Hint: Exercise 1 may contain helpful code fragments

  9. Setup • The lab computers are preinstalled with all necessary tools and the exercise skeletons • An Eclipse plug-in for TinyOS development is installed and configured. Check the following website for a quick start on how to use it:http://dcg.ethz.ch/projects/tos_ide/

  10. Compiling • For all Exercise applications two compile commands are defined. • Target tinynodeis used to compile the application. The compiler output is directed to the Eclipse console • tinynode install is used to compile and flash the application to a sensor node • A popup asks for a bsl number. This is the identifier of the serial port the sensor node is attached to. The identifier count starts at 0. Therefore COM1 == 0, COM2 == 1, COM3 == 2

  11. Final Remarks • The lab is in the ETL building. Hardware and keys must be fetched in our office ETZ G64.1 • If you get stuck come back to ETZ G64.1 and ask for help • A FAQ page will be linked from the course website and updated regularly

More Related