Constantly sleep deprived, our team searched for ways to improve our sleeping habits. Studies show that warm light relaxes the body and prepares us for sleep. Additionally we wanted to come into this hackathon using hardware in some way. So it was perfect for us to control an LED strip to give us the perfect condition for sleep.

What it does

In order to control SleePi, you need to go onto the companion website, On this companion website, you can input in personal information and if you click on the "Normal" button, the website will calculate your recommended sleep time and the LED strip will automatically gradually turn into a warmer color to facilitate your sleep. There are additional features such as "Rainbow" which will flash a bunch of lights on the LED strip to help you wake up.

How we built it

We used HTML, CSS, JavaScript, and JQuery in order to make the website. For hardware we used Arduino and its sensors, and Raspberry Pi in order to receive the signal from the website and display the colors

Challenges we ran into

  1. Our group was not familiar with JavaScript going into this hackathon so we sacrificed a long period of precious time trying to figure out why one of our lists within a list was not working.

  2. We originally going to send the information from the website via PHP but we later found out that PHP is really buggy so we had to come up with a completely new method

  3. It got really confusing when dealing with time since JavaScript views time in milliseconds

Accomplishments that we're proud of

We used tools to make this program that we are not comfortable with. JavaScript and Arduinos were new to many of our group members so we are proud of learning new things and making an impressive hack at the same time.

What we learned

JavaScript and Arduino

What's next for SleePi

If we had more time we would like to have it connect to Spotify and play music when you are about to sleep.

Share this project: