- Node
- Python
- OpenCV module
- python-ar-marker module
$ git clone [email protected]:brutalchrist/cylon_mindwave_example.git
$ cd cylon_mindwave_example/
Generate a marker and print it
$ mkdir marker_images
$ ar_markers_generate_marker 666
$ open marker_images/marker_666.png
Setup camera (python/markerdetect.py
)
capture = cv2.VideoCapture(ID_CAMERA)
Test markerdetect
$ python python/markerdetect.py -d
Setup arduino devices (arduino_devices.py
)
marker_id: {
name: descriptive_device_name,
action: function with action of device
},
Setup Cylon connections (Robot.js
)
connections: {
neurosky: {
adaptor: "neurosky",
port: '/dev/YOUR_MINDWAVE_PORT'
},
arduino: {
adaptor: 'firmata',
port: '/dev/YOUR_ARDUINO_PORT'
}
}
And you arduino devices
devices: {
headset: { driver: "neurosky", connection: 'neurosky'},
descriptive_device_name: {
driver: CYLON_DRIVERr,
pin: PIN,
connection: 'arduino'
}
}
Add marker to device
Install node dependencies with yarn 🎉 (or npm 🤐)
$ yarn install
$ node Robot.js