Skip to content

brutalchrist/cylon_mindwave_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mindwave NeuroSky + Arduino + OpenCV + CylonJS

Requirements

Software

Hardware

Setup

Hardware

Arduino

Diagram

Mindwave Hack

Mindwave Hack

Software

$ 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

Marker Device

Install node dependencies with yarn 🎉 (or npm 🤐)

$ yarn install 

Run!

$ node Robot.js

Light

https://www.youtube.com/watch?v=pHXh-h6WPWw