Skip to content

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

Notifications You must be signed in to change notification settings

mkazc/Neuro-Gesture-Controlled-Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

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

OS / Software Versions :

Raspberry Pi 3 OS : Raspbian GNU/Linux 9 (stretch)
Python Version : 2.7.13
GPIO Version: 0.6.3

Libraries / SDKs / etc. :

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

On the Rasp. Pi:

On the Local PC :

  • Emotiv SDK - for utilizing Emotiv EPOC information
  • 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.

This final step is already done in this repo.

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

Install Kernel Support with sudo raspi-config

Interfacing Options/Advanced > I2C > Enable

sudo reboot

After rebooting, detect HAT sudo i2cdetect -y 1, which will output a table.

It should show two I2C addresses are in use – 0x40 and 0x70.

0 1 2 3 4 5 6 7 8 9 a b c d e f
00 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40 : 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70 : 70 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

In the terminal

Finally, downloading the code.

The older version listed below is what was used in this project.

Old:

Download the code (legacy branch)

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

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 :

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages