Skip to content

Commit

Permalink
Update leap & neuro event handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-main committed Jun 20, 2017
1 parent 71adcc3 commit dc48528
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion platforms/leap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func main() {
l := leap.NewDriver(leapMotionAdaptor)

work := func() {
gobot.On(l.Event("message"), func(data interface{}) {
l.On(l.Event("message"), func(data interface{}) {
fmt.Println(data.(leap.Frame))
})
}
Expand Down
14 changes: 7 additions & 7 deletions platforms/neurosky/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,25 @@ func main() {
neuro := neurosky.NewDriver(adaptor)

work := func() {
gobot.On(neuro.Event("extended"), func(data interface{}) {
neuro.On(neuro.Event("extended"), func(data interface{}) {
fmt.Println("Extended", data)
})
gobot.On(neuro.Event("signal"), func(data interface{}) {
neuro.On(neuro.Event("signal"), func(data interface{}) {
fmt.Println("Signal", data)
})
gobot.On(neuro.Event("attention"), func(data interface{}) {
neuro.On(neuro.Event("attention"), func(data interface{}) {
fmt.Println("Attention", data)
})
gobot.On(neuro.Event("meditation"), func(data interface{}) {
neuro.On(neuro.Event("meditation"), func(data interface{}) {
fmt.Println("Meditation", data)
})
gobot.On(neuro.Event("blink"), func(data interface{}) {
neuro.On(neuro.Event("blink"), func(data interface{}) {
fmt.Println("Blink", data)
})
gobot.On(neuro.Event("wave"), func(data interface{}) {
neuro.On(neuro.Event("wave"), func(data interface{}) {
fmt.Println("Wave", data)
})
gobot.On(neuro.Event("eeg"), func(data interface{}) {
neuro.On(neuro.Event("eeg"), func(data interface{}) {
eeg := data.(neurosky.EEGData)
fmt.Println("Delta", eeg.Delta)
fmt.Println("Theta", eeg.Theta)
Expand Down

0 comments on commit dc48528

Please sign in to comment.