Code Monkey home page Code Monkey logo

eeg's Introduction

Mouse for paralyzed patients

These scripts can allow one to move the mouse of your computer through your brain activity. The Arduino monitors the active part of your brain at an interval and the user is required to think of one of the following depending on the direction the mouse is needed to move.

Right = Imagine moving your right arm and leg
Left = Imagine moving your left arm and leg
Up = Try solving a hard math problem or anything that intellectually challenges you to stimulate your frontal lobe. Requires concentration.
Down = Imagine navigating through your house.

Note: You may use another setup and the neural network can identify your arrangement if you the setup remains consistent. The setup above is just an example or a starting point.

This software uses a neural networks and other machine learning algorithms that require training. Therefore it is also advised to have someone help you in the process. Requirements: Python 3.5 Arduino Electrodes Administrator Access to computer

Installation guide:

  1. Install python 3.5 from https://www.python.org/downloads/

  2. Install the following python packages.

    • numpy
    • sklearn
    • scipy
    • pandas
    • pyserial
    • Keras

    Use "pip install " in your shell to install.

  3. Install tensor flow from https://www.tensorflow.org/install/ and follow their guide.

  4. Install the Arduino Ide from https://www.arduino.cc/en/Main/Software

Training

  1. Setup the Arduino by connecting it to your computer and attaching electrodes to the analog ports(shown in the figure below). It is advised to use different colored electrodes for differentiation.

Arduino yun: alt text

  1. Upload the Arduino code into your Arduino through the Arduino IDE. Note the port in which your Arduino is connected to your laptop.

  2. Run the datahandling.py script and input the port when asked. To run the script, go to the directory in which you store these files and type "python datahandling.py".

  3. Input the direction you want to train the neural network.

  4. Think of one of the following(The direction you want to train your network) when a red light appears on your Arduino. Right = Imagine moving your right arm and leg Left = Imagine moving your left arm and leg Up = Try solving a hard math in your mindproblem or anything that intellectually challenges you to stimulate your frontal lobe. Requires concentration. Down = Imagine navigating through your house.

  5. You can also perform the thinking process throughout the entire time instead of waiting till the light appears. The arduino only monitors after the light appears.

  6. It is advised to spend as much time as possible training for each direction. There will be an improved performance through more training. It is suggested to spend around 15 minutes for each direction.

  7. Training is required only once per user or when performance is not to satisfaction.

Usage: Run ann.py by typing "python ann.py" in your shell after going to the directory in which you store these files. Think of the action you assigned whenever you see the light appear. The mouse will move accordingly.

eeg's People

Contributors

phan-kandula avatar

Watchers

 avatar

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.