AutoWake is a Pebble smartwatch app that automatically vibrates the Pebble or rings your phone when it detects that you are starting to fall asleep. It also has a companion Android app that controls the settings for the Pebble app.
The Android app that controls the settings can be found here: https://github.com/churichard/AutoWake-Android
Built by Richard Chu and Barak Nehoran at HackPrinceton Fall 2014.
The code is licensed underneath the MIT License.