Sha256: 1162b052b74488325bb914da73aa9fd953dc5737b822628176ec771472d5be63

Contents?: true

Size: 515 Bytes

Versions: 3

Compression:

Stored size: 515 Bytes

Contents

#!/usr/bin/env ruby

require "bundler/setup"
require 'mindwave'

class EEG < Mindwave::Headset
	# override Attention-Callback-Method
	def attentionCall(attention)
        	str = eSenseStr(attention)
        	puts "this is an attention #{attention} #{str}\n"
	end
end

# create a new instance
mw = EEG.new
# mw.log.level = Logger::DEBUG

# if we hit ctrl+c then just stop the run()-method
Signal.trap("INT") do
	mw.stop
end

# Create a new Thread
thread = Thread.new { mw.run }
# ..and run it
thread.join


mw.close

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mindwave-0.1.5 examples/mindwaver.rb
mindwave-0.1.4 examples/mindwaver.rb
mindwave-0.1.3 examples/mindwaver.rb