Having been interested in meditation, consciousness modification and the quantification and monitoring of self performance, the following webpage posted on Hack-a-day caught my attention:
The Mindflex uses Neurosky technology to read brainwaves. Here’s a quick excerpt from the website:
Utilizing NeuroSky’s advanced ThinkGear™ technology, Mindflex™ reads your brainwave activity with a wireless headset. Concentrate…and the ball rises on a cushion of air! Relax…and the ball descends. It’s literally mind over matter!
What the Mindflex toy looks like. That’s not me, by the way
I managed to pick a Mindflex up for about £50 from Amazon here (plus I had a £25 gift certificate lying around, so managed to justify the price quite nicely, cheers!).
The guys over at frontiernerds grabbed the data from the Mindflex headset’s serial pins using an Arduino. After some success with this approach, I decided to test a more elegant solution. This experimentation was also born out of a desire to minimise the (already small) risk of electrocution that had so carefully been pointed out on the frontiernerds website.
Getting the data out
I found some bluetooth to serial modules on the dealextreme website – you can see them here. Fortunately these modules work with a 3.3v supply, so was able to power it straight from the headset’s power supply. I fired up a quick project in Visual Studio and tested the data stream from the headset, and it appeared to work! Unfortunately my port of the Arduino Brain Library to .NET didn’t work quite as expected.
So, the next stage of the project is an Android application to read data from the Mindflex (and optionally, a bluetooth enabled heart-rate monitor) and log the appropriate power bands to a local database, provide some nice charts and optionally log the data in real time to a remote server. I have started the coding already, and you can find the project here:
The following script will create a new phonebook entry in Swyx. You’ll need the IpPbx PowerShell modules installed first. Oh, and be sure to replace [servername] with, well, the name of your server.
Before you can use the IpPbx cmdlets in PowerShell, you need to install the modules first. Grab the IpPbx modules from here, be sure to get the correct version:
As our ‘My Documents’ folder live on the domain server, we had some issues. The install appeared to go ok, as you can see:
-----------------------------------------------
IPPBX POWERSHELL MODULE - INSTALLATION SCRIPT
-----------------------------------------------
1. Install for Current User only
2. Install for All Users
3. Remove every module version
WARNING:
PLEASE NOTE THAT OTHER MODULE VERSIONS
WILL BE DELETED DURING INSTALLATION!
Select 1-3: 1
-----------------------------------------------
Searching for other Module Versions...
Installing for Current User...
-----------------------------------------------
Process completed!
Press any key to continue ...
Do not do the above! Because you then get this:
PS C:\Users\xxx\Desktop\IpPbxPowerShellModule_v8.1.0.50 (1)> Import-Module IpPbx
Add-Type : Could not load file or assembly 'IpPbxBLOB64, Version=8.0.0.3, Culture=neutral, PublicKeyToken=null' or one
of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
At \\xxx\Users\xxx\WindowsPowerShell\Modules\IpPbx\IpPbx.psm1:106 char:13
+ add-type <<<< -Path (join-path $ScriptFolder "Binaries\IpPbxBlob64.dll") | out-null
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand
This is because it installed the modules in the folder on the server, and network paths are not trusted.
Instead, install for all users – option 2 (you need to run the PowerShell command prompt as Administrator).
To check the install, run the following command:
get-module -ListAvailable
The result list must contains the following entries:
Script Accelerators
Manifest IpPbx
If it does, then all should be well.
For more information on Swyx telephony & the Swyx Powershell modules, please check out the following link: