CIS 542 - Spring 2012
Simple Arduino Project Description
The system shall consist of three major components, described as follows:
Note that because of firewall restrictions on the SEAS network, if you are running your middleware component on a Linux machine in the lab, you must use port 3001 for your server, and it can only be accessed by devices on the SEASnet network. Please be sure to discuss this with a member of the teaching staff if you are unsure.
- Temperature sensor: The sensor is to be a Gravitech 7-Segment Shield attached to an Arduino Duemilanove or Arduino Uno; both pieces of hardware will be provided to you. You may start with this Arduino program which reads the temperature and writes to the serial port once a second.
- Middleware: The sensor shall be connected via USB to a Linux or Mac machine, which will run a C program that handles all communication between the sensor and the user interface.
- User interface: The user interface will be an Android application running on an Android-enabled smartphone (one will be provided to your group if necessary), which communicates with the middleware over the Internet.
Your system must fulfill all of the following requirements:
- The user should be able to see the most recent temperature reading. If temperature readings are being reported by the sensor, the values should automatically update in the user interface.
- The user should be able to see the average, low, and high temperature reading for the past 24 hours.
- The user should be able to see the average, low, and high temperature reading for the past 7 days.
- The user should be able to see a graphical representation (i.e., temperature readings displayed as a function of time) for the past 24 hours.
- The user should be able to set a threshold, such that, if the temperature goes above the threshold, the user will be notified even if she is not using the application.
- The user should be able to decide whether to see temperature readings (and statistics) either in Fahrenheit or Celsius. Additionally, the user should be able to change the 7-segment display on the sensor to show the temperature either in Fahrenheit or Celsius.
- The user should be able to put the temperature sensor into a "stand-by" mode in which it is not reporting temperature readings. When the sensor is in "stand-by" mode, the user should also be able to tell it to resume reporting the readings.
- If the user interface cannot connect to the middleware, a helpful message should be shown to the user.
In addition to the functional requirements listed above, your group must come up with two other (non-trivial) features to include in your system. One feature must involve sending a control message from the user interface to the sensor; the other feature must involve the processing and/or display of the data that is sent from the sensor to the user interface. Please discuss your additional features with the instructor before proceeding.
In addition to satisfying all of the above requirements, your system should also meet these criteria:
You may assume that all components are "dedicated" to each other, e.g. that your middleware component will never need to serve a different user interface, and that your user interface will never need to connect to a different server.
- When displaying the most recent temperature reading, the data should be no more than five seconds old. If it is more than five seconds old, a message should be shown to the user (you can assume that the clocks on all devices are synchronized).
- The Arduino program must use no more than 32KB of memory, including space needed for the code (this is actually a physical restriction, not one we just made up!).
- The C program (middleware) must use no more than 128KB of heap space (okay, this restriction we kind of made up).
- If the Android device has less than 20% of its battery remaining and the user is viewing the most recent temperature reading, the reading should be updated once every 15 seconds.
- If the device has less than 10% of its battery remaining, the reading should be updated once every minute.