/Neuro-Gesture-Controlled-Robot

Controls small two-wheeled bot with Raspberry Pi using Myo armband and EMOTIV

Primary LanguagePython

Neuro-Gesture-Controlled-Robot

Controls small two-wheeled bot with PWM/Servo Pi HAT and Raspberry Pi 3 using Myo armband and EMOTIV EPOC

Overview :

  • Robot wheels move according to armband gyroscope axes
  • EMOTIV overrides robot to force stop when user is not concentrating

Libraries/SDKs/etc. used :

  • PyNetworkTables - for using networktables between the Rasp. Pi and the PC

On the Rasp. Pi:

On the Local PC :

  • Emotiv SDK - for using Emotiv EPOC information and using it
  • Pynetworktables

Installing Libraries on Rasp. Pi:

PyoConnect :

Plug in bluetooth adapter for armband into Pi.

// permission to ttyACM0 - must restart linux user after this
sudo usermod -a -G dialout $USER

// dependencies
sudo apt-get install python-pip
sudo pip install pySerial --upgrade
sudo pip install enum34
sudo pip install PyUserInput
sudo apt-get install python-Xlib
sudo apt-get install python-tk

Now reboot.

Download and unzip PyoConnect 1.0 folder. Then move files to folder with the code that will be used.

Pynetworktables :

sudo pip install pynetworktables

Servo PWM Library:

Install RPi.GPIO library.

sudo apt-get update

#For Python 2
sudo apt-get -y install python-rpi.gpio

#For Python 3
sudo apt-get -y install python3-rpi.gpi

Install I2C tools

sudo apt-get install python-smbus
sudo apt-get install i2c-tools

Detect HAT

sudo i2cdetect -y 1
Old:

Download the code (legacy branch, code used here)

sudo apt-get install -y git build-essential python-dev
git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/legacy

Use the files in Adafruit_PWM_Servo_Driver.

New:
sudo apt-get install -y git build-essential python-dev
git clone https://github.com/adafruit/Adafruit_Python_PCA9685.git
cd Adafruit_Python_PCA9685
sudo python setup.py install

Notes :