Basic serial-debug demo of reading and parsing data from Neurosky's Mindwave Mobile EEG headset via BlueSMIRF Silver bluetooth modem.

Dependencies:   mbed

Basic demo of reading data packets from Neurosky's Mindwave Mobile headset via BlueSMIRF Silver bluetooth modem. Adapted from http://developer.neurosky.com/docs/doku.php?id=mindwave_mobile_and_arduino

Connect pin9 to BlueSMIRF's RX and pin10 to BlueSMIRF's TX, also hook up GND to GND and VCC to the mbed's 3V3 supply.

To prepare the BlueSMIRF to auto-connect to the Mindwave Mobile:

First wire it up and power it using the mbed's power pins. Once it's powered, pair your computer to the Mindwave Mobile headset to you can find out its MAC address. Write that down as you will need it.

Next pair your computer to the BlueSMIRF so we can configure it. It will appear as RN-42-5922 or similar (it's a Roving Networks RN-42 unit).

Now we can use a terminal program to connect to the serial modem created on your computer that connects wirelessly to the BlueSMIRF - by default it's at 115200 baud, 8 N 1 - when you're connected the light will go green.

If you've got a successful serial connection, put it into command mode by typing three dollar signs $$$ - if successful you should see a prompt saying 'CMD'. If not, power it down and try again till you get a CMD prompt.

At that prompt we need to change some defaults so that the BlueSMIRF is set to master mode, 57600 baud and sends a pincode of '0000', and seeks to connect to the headset's MAC address. To do this, type:

SP,0000
SM,3
SR,<the 12 digit MAC address of the headset written down earlier>
SU,57.6
D

You should see AOK after each line, and after the D it will print out its settings so you can check it's now AUTO, 57600, using 0000 and the right MAC address. All being well, type three minuses '---' to exit command mode.

To check it's working, close the terminal you've been using, reboot the BlueSMIRF (flashing red light) and switch on the Mindwave Mobile headset - the light on the BlueSMIRF should go green when it connects and the flashing blue light on the Mindwave Mobile headset should go steady blue.