Project 1 - Getting Started with the SPOTs

Due - Wednesday, September 10, 2008

The goal of this assignment is to familiarize you with the SunSPOTs and get you started on your semester-long project.  Begin by reading the SPOT developer's guide.

Part 1 - Demos

0. Run the following demos:

1. (10 points) Implement a program that displays the current temperature using "persistence of vision" as the AirText demo does.

2. (15 points) Implement a program that displays the current temperature in binary using the LEDs.  A 1 is represented by an on LED and a 0 is represented by an off LED.  A temperature of 70 degrees would be represented as follows: LED[0]: off - LED[1]: on - LED[2]: off - LED[3]: off - LED[4]: off - LED[5]: on - LED[6]: on - LED[7]: off 

Part 2 - Movement Detection

1. (75 points) Implement a program that senses movement of a SPOT and notifies the entire network if movement occurs.  For this assignment, you can assume that the network diameter is at most 7. If a SPOT receives notification of movement anywhere in the network, it will change its LED color to red and turn on its LEDs.  Additional requirements and details are as follows:
  1. Use the IAccelerometer3DThresholdListener to determine whether movement has occurred.  
  2. Use the RadiogramConnection class to broadcast messages on port 42.  All SPOTs will also listen on port 42 for message from the rest of the network.
  3. All messages contain an integer to represent the message type followed by an optional payload.  Use 51 to represent a movement detected message. The payload of the movement detected message is a string representing the time at which the movement was detected.  See java.util.Date for the appropriate format of the Date string. Make sure to verify that a message is of the appropriate type before processing it.
  4. You may need to use the ISleepManager class to disable deep sleeping such that a SPOT can always receive and forward messages.

Due 3:30PM - Wednesday, September 10, 2008

  1. Complete and submit your working code. 
Note: No portion of your code may be copied from any other source including another text book, a web page, or another student (current or former). You must provide citations for any sources you have used in designing and implementing your program.
Sami Rollins