Controls small two-wheeled bot with PWM/Servo Pi HAT and Raspberry Pi 3 using Myo armband and EMOTIV EPOC
- Robot wheels move according to armband gyroscope axes
- EMOTIV overrides robot to force stop when user is not concentrating
- PyNetworkTables - for using networktables between the Rasp. Pi and the PC
- PyoConnect 1.0 - for using Myo armband with the Pi
- Adafruit PWM Servo Library / BBIO 12C - for driving motors with 16-Channel PWM Pi HAT
- Pynetworktables
- Emotiv SDK - for using Emotiv EPOC information and using it
- Pynetworktables
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.
sudo pip install pynetworktables
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
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.
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
- The Pi keeps a static ip address as does the PC
- The PC and Pi connect to same private mobile hotspot
- The Pi runs the program "main.py" when on startup using .bashrc