Final Project — All in One – The Full Package

A decline in the functional abilities of elderly is a sign of decline in their cognitive abilities. Therefore, one can use sensing systems that are embedded in the elderly homes to monitor their behavior. These systems can help collect valuable data that can be used by doctors to enhance their diagnoses. Therefore, I have built an Interactive Pillbox which isa visual notification system for patients to take their medication. Specifically, it is targeted toward patients who are assigned a caregiver that needs to continuously keep track of them and remind them about their medication. The idea is to give the caregiver an accessible way to communicate directly with the pillbox by sending it e-mail. Once the email is received, the pillbox will turn on the LED that corresponds to the day specified in the received email. The LED will turn off if and only if the patient opened the box. Once the box is opened, the pillbox will send e-mail back to the caregiver notifying him/her that the medication has been taken. Also, I have connected an accelerometer to the box so it can detect if the patients flips it to take the medication. This is important because one of the goals of such systems is to study the interaction of the patients with the pillbox. Understanding such behaviors will help in designing better and more adaptive pillboxes.


– Final Report:

Interactive Pillbox System: Interactive_Pillbox_System

– Datasheets and Breakouts:

1. XBee Module: XBee-Datasheet

2. XBee Explorer: XBee-Explorer

3. LIS302DL Accelerometer Breakout:LIS302DL-Breakout

4. LIS302DL Accelerometer DataSheet: LIS302DL Datasheet

– Circuits:

1. Interactive Pillbox Circuit:Interactive Pillbox Circuit

2. Accelerometer Circuit: Accelerometer Circuit

– Code:

1. Arduino Code (Sketch): Interactive Pillbox (*.pde) file

2. Java Mail Server:

NOTE: In order to run the code you will need to set your own configurations  for the mail server

(See the code documentation for more details) you will be communicating with i.e. Gmail, Hotmail, etc.

–> Source Files:

a. CareGiverUI: Give the ability to reset the application(a GUI with Reset Button)

b. MailSend: The Functionality of sending email through your mail service provider

c. MMThread: A Thread that monitors the incoming emails

d. ArduinoComThread: Notifies the Arduino Mega board when an email from caregiver has been received

–> Dependancies and Libraries:

Below is a picture of all the libraries you will need for the Java Mail Server:

Overall you will need: Java Mail Jar File (From,  Processing Libraries (From, and Arduino Library (From


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: