ChinaBlue
Posts: 11
Joined: Mon Jan 13, 2014 10:20 pm

NeuroSky & LPD8806 LEDs Advice

Mon Jan 13, 2014 11:23 pm

I am new to Raspberry Pi. I am interested in getting the NeuroSky states to change the color and speed of my LPD8806 LEDs. Can anyone recommend where/how to begin with this? I have the bluetooth connected and I am receiving data. I currently have the LEDs running on an arduino but assume I will have to have the code translated into Python, correct? Advice doing that would be appreciated too.
Thanks a ton.
China Blue
China Blue

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: NeuroSky & LPD8806 LEDs Advice

Tue Jan 14, 2014 12:48 am

The LPD8806 is easy. Some kind soul wrote a python library for it.
https://github.com/Sh4d/LPD8806

The NeuroSky turns up at: http://cttoronto.com/03/04/2013/interfa ... ve-mobile/ complete with some python code.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

ChinaBlue
Posts: 11
Joined: Mon Jan 13, 2014 10:20 pm

Re: NeuroSky & LPD8806 LEDs Advice

Tue Jan 14, 2014 1:32 pm

Thanks Dougie,
I have gotten that far. What I need to do is understand how to code it so the data from the NeuroSky will change the speed and colors of the LEDs. Any suggestions on how to do that?
China Blue

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: NeuroSky & LPD8806 LEDs Advice

Tue Jan 14, 2014 3:26 pm

ChinaBlue wrote:Thanks Dougie,
I have gotten that far. What I need to do is understand how to code it so the data from the NeuroSky will change the speed and colors of the LEDs. Any suggestions on how to do that?
Get both bits of python running. Once that's working glue them together into one big ugly python program or develop an interface.

I'd do it with an interface using MQTT as the transport. The led program subscribes to a topic. The NeuroSky publishes messages to that topic.

MQTT is available as sudo apt-get install mosquito

It is the protocol for the Internet of Things.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

ChinaBlue
Posts: 11
Joined: Mon Jan 13, 2014 10:20 pm

Re: NeuroSky & LPD8806 LEDs Advice

Tue Jan 14, 2014 8:35 pm

Thanks for the overview. That is valuable. Implementing the MQTT might be tough since it is not clear how the NeuroSky Alpha, Beta etc waves would be identified and how to have them perform different LED effects. I will get the LEDs running and then try to see is there is an interface that has been already developed. Are you familiar with OpenVibe? Would that work?
China Blue

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: NeuroSky & LPD8806 LEDs Advice

Tue Jan 14, 2014 8:47 pm

MQTT is simple, it's elegant and well supported.

Tutorial here: https://www.ibm.com/developerworks/comm ... x_and_gpio
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “General discussion”