Inspiration

Sleep deprivation and the inattentiveness that results is one of the leading causes of car accidents. With lack of adequate rest, the brain engages in "microsleep," short periods (a few seconds) of semi-consciousness during which the brain rests. This can be especially dangerous when driving, and it is inconvenient at best for other events requiring attention, such as during class. There needed to be some way of maintaining attention and alertness.

What it does

This app uses the front-facing camera on an Android phone to track facial features of the driver, the eyes in particular. When the driver appears to be falling asleep, the app will sound an alarm and/or vibrate the phone (based on user's preference) to alert the user.

How I built it

The app was created using Android Studio 2.2.3 on Linux.

Challenges I ran into

There is a confusing mix of online documentation for the deprecated Camera API and the newer Camera2 API, which are incompatible with each other. There were a lot of issues in trying to get either one or the other to work.

Accomplishments that I'm proud of

It mostly works!

What I learned

It is, in fact, possible for caffeine to be optional.

What's next for Eyes Open

The option to choose the ringtone would allow the app to be more customizable. Also, it currently only makes sense to run the app when the phone is charging because of the high battery usage; the ability to turn the phone's screen off while the app is open might make it slightly less of a battery drain.

Share this project:

Updates