A Hack Western 2 Pebble Project
PebbFit is a fitness app for both your Pebble Smartwatch and your Android phone that utilizes the accelerometer to sense when you are active during a workout. It automatically measures the active/resting time periods during your workout so you can concentrate on your actual sets instead of constantly having to hit the start/stop button on your phone. Furthermore, the android app will log your data into different graphs after each workout, which will provide you with a summary of your workout in various graphs.
How does it work?
The gem of our app is that we developed an algorithm to accurately determine, based on acceleration, your activity levels. Through trial and error, we were able to figure out thresholds that would detect whether a period of accelerometer values was high or low. We used both force and change in acceleration to determine whether a fixed period of time was experiencing a high or low change of movement. Then using a self made algorithm, we were able to combine consecutive high/low periods together into sessions. These sessions would accurately tell whether you were being very active or very inactive which is extremely useful for workouts.
Furthermore, we were able to identify special cases/anomalies and place them on the appropriate side using a self created comparison algorithm. It requires a threshold of x consecutive periods of high/low to be deemed a session. From this, it could also tell whether you were resting too much and also avoid mixing up small movements for large amounts of activity.
Finally with the data of high and low sessions stored on the pebble, we then transferred the data to the android app. Data transfer occurs once the user presses a button to end their workout, and then the android app would display the information in graphs to the user.
PebbFit can be refined into more complex ways of telling your activity period during a workout. We originally wanted to measure wasted time, in addition to active/rest periods, but this would require a much more complex algorithm. Further, there were several limitations we faced using the CloudPebble interface to code the pebble. For starters, you could not use double values so if you wanted to make more precise calculations, each value had to be multiplied by factors of 10. This would use more storage space, of which the pebble only has 512 kB of. Overall, this project was a great experience to work with Pebble's online SDK and we had tons of fun playing around with the cool smartwatch. With smartwatches becoming more and more popular nowadays, innovation for these devices will become evermore important to shaping our digital future.