Mind Controlled Drone
by jose.salgado in Circuits > Remote Control
5443 Views, 21 Favorites, 0 Comments
Mind Controlled Drone
1) Getting the parts and software
2) Solder the Bluetooth module to the mindflex and then put it in the case
3) Connect to the Module from your laptop
4) Use brainwave osc to read brainwaves
5) Open processing and import the proper libraries and then paste in this code
6) Open Ar-drone webflight and now the keyboard that is controlled by your mind controls the drone
The Parts
- HC-06 Bluetooth Serial Module
- MindFlex EEG Headset
- 3 AAA Batteries
- Small Screwdriver
- Soldering Iron
- Computer with Bluetooth connectivity
Stuff to download
-
Download BrainWavesOSC
-
Node.js
-
Download Processing
- Download ar-drone webfligt
Solder the Bluetooth Module to the MindFlex Headset
Here are some Informative Pictures on where to solder each part
Connect to the Bluetooth Module With Your Computer
- Find your Bluetooth module in your bluetooth settings and connect to it
- The password is "1234"
Using BrainWavesOSC to Read Your Mind Waves
- Unzip the BrainWaves folder and edit the settings.xml file to match your Bluetooth String
- Change it and save the file
- Make sure you're connected to the Bluetooth module and then run BrainWavesOSC and you'll start seeing your brain waves
Windows Users: You have to find the COM Port that the Bluetooth module is connected to. It's probably COM11 or COM5. You can use the device manager to see what your ports are connected to.
Mac Users: Type in ls /dev/tty.* in your terminal. A list of serial devices will pop up. The one you want to copy should look like this /dev/HC-06-DevA.
Make a Processing Application That Will Interpret Those OSC Messages and Then Be Able to Stimulate Your Keyboard
- Open Processing and import the Osc5 Libraries
- Then paste in this code
- Edit the code so that when your meditation or attention levels are high the "t" key is pressed
-
Edit the code so that when your meditation or attention levels are low the "l" key is pressed
Ar-drone Webflight
Download ar-drone webflight
- Follow the instructions on the github project
- You will copy the config.js.sample to config.js and edit to select your plugins (You don't need ffmpeg because there's already a plug called video-stream that will stream live video from your drone, just make sure it's not commented out)
MIND CONTROL THE DRONE
- Connect to the drone's wifi
- Make sure you're connected to the bluetooth module
- Run "node app.js" in your terminal
- Point your browser to https://localhost:3000/ or https://localhost:3000/ (it depends on your computer type)
- Then run the processing app and go back to your browser
- The Processing app will be pressing the "t" key when your attention or meditation levels are high depending on how you edited the code. When "t" is pressed it will take off. When "l" is pressed it will land.