Coder Social home page Coder Social logo

shreyexp / dreamhacker Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 4.0 46.69 MB

Dream Hacker is project designed to help you sleep better. Our project plays an audio when a user is asleep.

Home Page: https://www.dreamhacker.co.uk/

License: GNU General Public License v3.0

CSS 0.73% PHP 26.30% C++ 57.80% Shell 0.18% CMake 0.93% C 14.06%
raspberry-pi ecg dreams cpp php pressure-sensors c-plus-plus nginx-proxy jquery fastcgi

dreamhacker's Introduction

Dream Hacker


Logo

Dream Hacker is program designed to help you have better dreams. Our projects monitors our users heart rate and plays an audio file chosen by the user. Once Dream Hacker detects the user has entered sleep ie. when the beats per minute is below a certain threshold it will play the selected audio.

This setup takes data from pulse sensor and time of the day etc, to predict when the person has slept. Then after a while start the audio stimulus.

Checkout docs »
Read the wiki »

                   

Discuss with us ·

Contents

  1. About
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
  6. References

About

Dream Hacker is program designed to help you have better dreams. Our projects monitors our users heart rate and plays an audio file chosen by the user. Once Dream Hacker detects the user has entered sleep ie. when the beats per minute is below a certain threshold it will play the selected audio.

Website interface enables user to select the music they want to play while they are sleeping. They can also see their different information using web Interface. The information will include bpm (beats per minute), the threshold and when the user has slept.

Contributors Stars Issues License


If you have any questions about DreamHacker or want to share some information with us, please go to one of the following places:

Before you file an issue, make sure you have read the known issues.

Hardware

Software

See Documentation

Roadmap

[-] Next Software Release (v2.0) - ML of sleep detection using Python and ML algo

  • [-] User input integrated
  • [-] User sleep timings integrated
  • [-] Social Media Presence improvement
  • [-] Pulse sensor improvements
  • [-] Web-Server Improvments
  • [-] Gather Training Dataset
  • [-] Train sleep detection
  • [-] Test on real samples

Getting Started

Installation

Hardware

  • Set up the circuit as shown in the diagram.
  • Put a speaker with it's audio jack in the audio output of the raspberry pi.
  • For more information: Hardware Wiki

Software

1. Use SSH, VNC or a monitor and a keyboard to login to raspberry pi.
2. Install the audio player mpg123
3. Clone the repository somewhere in the Raspberry Pi.
4. Run the following commands from inside the repository 
 - cmake .
 - make

Usage

  • Put your audio files inside the directory audio/.
  • Edit the audio.txt file with the name of the audio you want to play when the sleep starts. For example if you want to play my_file.mp3 present in the audio/ directory then write audio/my_file.mp3. Make sure that the file has just one line.
  • Run ./drmhk -h to explore what are the parameters which can be feeded as the input to the program.
  • Example: If you want to run the program as a simulation and set the beats per minute threshold to 70 then run ./drmhk -s 1 -t 70.
  • To run in default mode run ./drmhk

Contributing

See CONTRIBUTING for more information.

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

Team 39 in Real Time Embedded Programming

👤 Amber Dehariya (2594660d)

👤 Michael Hiluf (2529225h)

👤 Praveen (2620969t)

👤 Shreyansh Singh (2611417s)

References

dreamhacker's People

Contributors

amberdehariya avatar mhiluf avatar praveen-uofg avatar shreyexp avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dreamhacker's Issues

ReadMe updation

Add How to use, contribution Insights, license etc different sections.

Localhost Requirements

The localhost must be able to receive the following values from main.cpp

Receive

  1. Beats per minute value (Integer)
  2. A variable which can take the following values "Audio On" or "Audio Off"

Send

  1. The user must be able to set a threshold value of beats per minute on the webpage.
  2. The localhost must respond to the main.cpp with the threshold value as a response.

Ppeline

Add pipeline from C++ to webserver

Nginx config

Nginx config to serve realtime data with different php pages.

Use of CMake

Use Cmake to compile and run C++, refactor and add Inheritance from CPP timer class.

Audio Selection

Audio selection using C++ and pi and synch with front end

Creation of client in c++

Creation of a client which will talk to the localhost.

Send

The client must be able to send the following values to localhost:

  1. Beats per minute
  2. A boolean signal "AudioOn" or "AudioOff"

Recieve

The client must receive an integer from the localhost indicating the threshold value of the BPM.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.