Close

The Android App

A project log for Hospital in a Toilet

Embed sensors into your toilet to monitor your health daily

abhipray-sahooAbhipray Sahoo 08/20/2014 at 20:030 Comments

On the Arduino side, we used the Bluetooth Mate Silver (https://www.sparkfun.com/products/12576) to send sensor data to an Android app. We created the prototype app with a simple user interface. 

It has a slider control that allows the user to see all past history. In the initial version, we also developed a visualization of the RGB values with the ColorMatrix class.  This gives a visual representation of the RGB color value that the sensor sees and is useful for calibration purposes.  

We decided to not store any data locally, and instead have a single Open EMR server store all user data. So the app connects with this server, pulls in data asynchronously and loads the user data history into the UI. 

Using the Bluetooth class, we connect with the Arduino. A button allows the user to initiate the connection between the Arduino and the phone. Once the connection is established, the Arduino continues to transmit RGB values from the color sensor and pressure values from the differential pressure sensor. After a couple of seconds, when the sensor data coming in has stabilized, the user can hit the stop button. The app will use a mvong average filter and compare it to a linear model. It'll then produce the recommendation based on that final moving average. 

Here's a video demonstrating it in action: https://www.youtube.com/watch?v=sGEtdV729dg&feature=youtu.be

Discussions