CIS-3520 Homework #1 (TinyOS Temperature Sensing)

The purpose of this assignment is to give you some practice writing nesC programs for TinyOS. In addition this exercise is the first step toward building a potentially useful wireless sensor network application for the VTC campus.

The goal is to build a network of temperature sensing motes that make periodic readings of temperature in the various rooms around campus. The data collected is to be forwarded to a "base station" (in BLP-415) where it can be gathered and, ultimately, inserted into a database and processed. Notice that this application currently does not entail any actuators; it uses only sensors.

For now, we will just use a flooding approach to forwarding data: each node broadcasts the data it collects to all of its neighbors. This causes every node to see every message. Such an approach is only suitable for small networks that sample data relatively infrequently, but it will be adequate for now. Notice that this does require that nodes remember which data packets they have seen "recently" so they can avoid rebroadcasting them.

As an additional simplication we will let the nodes run continuously. While this consumes power much too quickly for a serious application, it will allow us to get something up and running quickly that we can refine later if we choose.

The basis for your code should be the temperature sensing example and the Mote-to-Mote radio communications tutorial.

Here are a few additional comments and requirements:

  1. Each packet should contain the node address of the original sending node, the temperature data, and some sort of time stamp. A packet should be uniquely identified by its original sender and time stamp.

  2. Use Active Message type 37 for the packets containing temperature data used by this application. This is an arbitrary number, but it will distinguish the packets from that used by other applications.

  3. Read the sensor and broadcast the data once every five minutes. When you do this, toggle the red LED (LED #0).

  4. When an incoming packet is received, toggle the green LED (LED #1). Rebroadcast it if necessary.

  5. You will need to define a component that tracks recently seen packets with commands for installing a new packet and seeing if a given package is known to the node.


Last Revised: 2019-09-09
© Copyright 2019 by Peter C. Chapin <pchapin@vtc.edu>