Collecting and analyzing data to improve restedness level from sleep.
I've been having poor quality sleep and wake up feeling unrested with "adequate hours" of sleep.
- Movement Level: Objective measure of overall amount of movement during sleep (higher = more movement).
- Restedness Level: Subjective measure of how rested I feel after waking up (higher = more rested).
- Lower movement level correlates with increased restedness level.
- Movement level will be lower with lower ambient light levels.
- Movement level will be lower with temperatures in the low 60's Fahrenheit.
- Movement level will be lower with decreased amount of caffeine consumption.
- Movement level will be lower with longer time between consumption and sleep time.
- Higher duration of sleep will correlate with higher restedness level.
- Accelerometer: Tracks x/y/z accelerator and x/y/z angular velocity
- Photoresistor: Track ambient light levels
- Temperature Sensor: Tracks temperature in celsius
- Humidity Sensor: Tracks relative humidity
These instructions will get a copy of the project up and running on your local machine.
Instructions for installing these software are listed in the next section: Installing. These are the software packages needed to run:
- Arduino IDE
- i2cdevlib
- Processing
- Python 2.7
These Python packages are also needed:
- Tkinter
- numpy
- pandas
- matplotlib
From a hardware perspective, the following are needed:
- Arduino board: The Arduino Uno is a good option
- Breadboard: Something like this
- MPU 6050: Accelerometer available for purchase from Amazon and more information from Arduino
- DHT22: Temperature/humidity sensor available for purchase from Amazon or Adafruit
- Photoresistor: Any type should do. This one from Adafruit will work
- Male-to-male ribbon cable: Something like this
Download the latest version of the Arduino IDE here.
Download the latest version of i2cdevlib here, following the instructions provided in the README.
Download the latest version of Processing here.
If your computer does not already have Python 2.7 installed, download it here.
By default, Python should come with pip (a package manager). Use it to install the following dependencies by opening the Terminal/command line and entering the commands as follows, each line as a separate command (make sure to capitalize Tkinter):
pip install Tkinter
pip install numpy
pip install pandas
pip install matplotlib
- Arduino - A hardware/software board to collect sensor data
- i2cdevlib - Library for interfacing with MPU6050 accelerometer
- SoftwareSerial - (Built in) Arduino library for serial communication
- Processing - A sketchbook for visual arts with simple Arduino integration
- Python - A programming language used here to create exploratory data graphs
- Tkinter - Python library for graphical user interfaces (GUI)
- Numpy - Python library for mathematical and matrix operations
- Pandas - Python library for data manipulation
- Matplotlib - Python library for graphing data
- Eric Yates - Github Profile
This project is licensed under the MIT License - see the LICENSE.md file for details.