For students away at universities, it has become more important than ever to know how to take care of oneself. As college students, we are exposed to a variety of things, including alcohol. Even though we've all had educational classes or seminars in school about drinking safely, sometimes a gentle reminder can make a huge difference. That's where we came up with the idea of HappyHour, a pebble app that can keep you safe.

What it does

HappyHour initially asks users for a couple of inputs: height, weight, and gender. These parameters will be used to calculate the blood-alcohol-content (BAC). BAC is a universal measurement of the alcohol in an individual's system. It is a complex equation that our application simplified for each individual personally.

From then onwards, users can specify a '+' or a '-' button, allowing them to keep track of how many drinks they've had with a click of a button. The BAC accordingly updates and creates a vibration, reminding them about their drinks. When the BAC is above 0.08 (the legal threshold for drunk driving), HappyHour creates a longer vibration, indicating that the user should take an Uber home. A click on the select button will trigger an http request that the pebble sends to our node.js server, where we use Uber and Twilio API to text the user information on the nearest Uber, time required to take them home, and estimated price.

Challenges We ran into

Developing on Pebble Time was a learning curve at some points, especially when we were having trouble uploading color resources and performing GET http requests to send longitude and latitude data.

Accomplishments that We are proud of

We are definitely proud of parsing through the Uber JSON API data, as well as setting up Pebble Time to perform GET XMLHttp requests and extract information from that to obtain the geographic coordinates of the Pebble. The entire process of getting user-selected data and displaying the BAC in real time was also difficult, but we've learned a lot in the process!

What's next for HappyHour

We hope to clean up the user interface code a bit (it's difficult to have good coding habits at hackathons!). We also hope to be releasing the app for othesrs to see and use.

+ 6 more
Share this project: