Added Mindflex prefix to the channels so they can be identified when running in parallel with other plugins.
lucidcode
Lucid Scribe App lucid dreaming tools Lightened Dream journal for lucid dreamers Halographs dream detection devices Lucid Scribe biofeedback software Lucid Scribe Database open dream research Discord Server research & dev updatesPopular Posts
NeuroSky ThinkGear EEG 0.9.6 (53)
NeuroSky ThinkGear EEG 1.0.9 (35)
Lucid Scribe 1.3.7 (19)
Zeo 0.9.0 (19)
Categories
- Hacking (13)
- Security (3)
- Hardware (12)
- Halograph EEG (1)
- Halograph EOG (8)
- Halograph FM (1)
- Halovision INSPEC (4)
- Research (16)
- Software (279)
- Lightened Dream (28)
- Lucid Scribe (68)
- Lucid Scribe Android (9)
- FILD (4)
- Halovision (2)
- ThinkGear EEG (3)
- Lucid Scribe App (4)
- Lucid Scribe Plugins (173)
- BrainFlow (2)
- Emotiv EPOC (1)
- Halovision (47)
- Hypnodyne ZMax (1)
- InteraXon Muse EEG (6)
- Keyboard (3)
- LightStone IOM (12)
- lucidcode Halograph FM (6)
- Mattel Mindflex (5)
- Microphone (2)
- Milliseconds (3)
- Mouse FIELD (12)
- Muse (2)
- NeuroSky ThinkGear EEG (31)
- OCZ NIA (2)
- OpenBCI (2)
- OpenEEG (14)
- Ping (1)
- Pranayama (6)
- tACS (8)
- TCMP (8)
- tDCS (8)
- TI EZ430 Chronos (3)
- Zeo EEG (13)
- Lucid Scribe Plugouts (7)
- Arduino (1)
- Screen LED (1)
- Yocto PowerRelay (5)
- Hacking (13)
Hello, I copied mindflex ddls( Interface.dll & PluginMattelMindflex.dll ) into the Lucid Scribe folder. Prompt ask me for port and I select my port. But I got lucidscribe interface error message after.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.MissingFieldException: Field not found: ‘lucidcode.LucidScribe.Interface.LucidPluginBase.LastMinute’.
at lucidcode.LucidScribe.MainForm.tmrUpdate_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I think you only need to copy the PluginMattelMindflex.dll across… the Interface.dll should be the original one from Lucid Scribe. Can you try re-installing Lucid Scribe?
Hei Mate , great project Im buyed MindFlex for modding with arduino , have arleady Interaxon Muse for multipurpose but not practice for dream, a band its more confortable, modded the RX TX of TGAM and setted Software serial on digital IO on arduino read correct signal at 9600 baudCSV
200,0,0,1245975,612113,129385,394699,150270,207661,146093,1174696
the but when reconfigure the TGAM by UART command 0x02 to set RAW output and 57600 baud the serial monitor show ERROR:PACKET TOO LONG 170 and some 59,54,23 csvdata
How can create from Arduino Brain Lib script use detect REM state and pilot led blinking ?
I don’t think the packet too long error is critical, some packets might just get lost.
You can use this to detect eye movement artificats:
https://github.com/lucidcode/LucidScribe-ThinkGear-EEG/blob/master/ThinkGear%20EEG/PluginHandler.cs#L426
Hi Michael, have written to you on skype but not have accepted my request, Im learning programming but not expert now.
Have loaded Light Scribe with Think Gear AM plugin but not display , with MindFlex plugin see only attention and meditation signal .
Ihave connected arduino to TGAM mindflex with RX and TX softserial and have tested with 9600 baudrate but in manual see there are 3 funcion 0x00 0x01 0x02 as in datasheet
Output & Baud Rate:
• 1200 Baud with Attention, Meditation, EEG Powers (alpha, beta, etc) and Poor Signal Quality
• 9600 Baud with Attention, Meditation, EEG Powers (alpha, beta, etc) and Poor Signal Quality
• 57600 Baud with Attention, Meditation, EEG Powers (alpha, beta, etc) and Poor Signal
Quality and Raw EEG wave
TGAM1 has confguration pads that can be used to change two default settings that are applied at
chip power up. we confguration pads are located on the backside of the TGAM1, as indicated by
the red and blue box in Figure 3.1. the BR0 and BR1 pads con?gure the output baud rate and data
content, after the TGAM1 powers up. the M pad con?gures the notch ?lter frequency.
Figure 3.1: TGAM1’s Con?guration Pads
BR1 BR0 Function
GND GND 9600 Baud with Normal* Output Mode
GND VCC 1200 Baud with Normal* Output Mode
VCC GND 57.6k Baud with Normal* + Raw Output Mode
VCC VCC N/A
* Normal Output mode includes the following output: poor quality value, EEG value, Attention value and
Meditation value.
GNDand
third row of pads are VCC. e TGAM1 output baud rate and data content after power up behavior
January 27, 2011 | © 2009 NeuroSky, Inc. All Rights Reserved.
7
Chapter 3 – Configurable Default Settings
depends on the pad setting as described in table above. For example, the stuff option in the module
in Figure 3.1 has both BR1 and BR0 tie to GND pads for a 9600 baud with Normal Output Mode.
Figure 3.2: B0 and B1 pads
the baud rate can also be confgured after the module is powered up by sending commands through
the UART interface. the commands are listed in the table below. When the module is reset, the baud
rate setting will revert back to the default set by BR0 and BR1.
Command Function
0x00 9600 Baud with Normal* Output Mode
0x01 1200 Baud with Normal* Output Mode
0x02 57.6k Baud with Normal* + Raw Output Mode
For correct read all signal and print in Lucid Scribe whats considering thats ? Ive tested with thats script
// Arduino Brain Library – Brain SoftSerial Test
// Description: Grabs brain data from software serial on pin 10 and sends CSV out over the hardware serial
// More info: https://github.com/kitschpatrol/Arduino-Brain-Library
// Author: Eric Mika, 2014
#include
#include
// Set up the software serial port on pins 10 (RX) and 11 (TX). We’ll only actually hook up pin 10.
SoftwareSerial softSerial(2, 3);
// Set up the brain reader, pass it the software serial object you want to listen on.
Brain brain(softSerial);
const int ledPin = 13; // 13 is handy because it’s on the board.
long interval = 500; // Changes based on attention value.
long previousMillis = 0;
int ledState = LOW;
void setup() {
// Start the software serial.
softSerial.begin(9600);
// Set up the LED pin.
pinMode(ledPin, OUTPUT);
// Start the hardware serial.
Serial.begin(9600);
}
void loop() {
// Expect packets about once per second.
// The .readCSV() function returns a string (well, char*) listing the most recent brain data, in the following format:
// “signal strength, attention, meditation, delta, theta, low alpha, high alpha, low beta, high beta, low gamma, high gamma”
// Expect packets about once per second.
if (brain.update()) {
Serial.println(brain.readErrors());
Serial.println(brain.readCSV());
// Attention runs from 0 to 100.
interval = (100 – brain.readAttention()) * 10;
}
// Make sure we have a signal.
if(brain.readSignalQuality() == 0) {
// Blink the LED.
if (millis() – previousMillis > interval) {
// Save the last time you blinked the LED.
previousMillis = millis();
// If the LED is off turn it on and vice-versa:
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;
Serial.println(interval);
// Set the LED with the ledState of the variable:
digitalWrite(ledPin, ledState);
}
}
else {
digitalWrite(ledPin, LOW);
}
}
Have insered SoftSerial.write and 0x00 0x01 0.02 but only can read 9600 baud seems
this its unsucescfull data to lucid scribe ? use Raw data or the other
Best regards
Elio
Hi Elio,
Sorry I missed you on Skype.
You can change the baud rate here:
https://github.com/lucidcode/LucidScribe-Mattel-Mindflex/blob/master/Mattel%20Mindflex/PluginHandler.cs#L47
And then after opening the serial port, you can write the 0x02…
Hi ! I recently purchased a mindflex and intended to use it with LucidScribe, however for some reason the graph shows only the attention and meditation channels out of the 11 available (I did check them all to appear in the graph). I took a screenshot but I don’t know how to post it in the comment -_-“. Is there something I’m doing wrong ? I’ll add that I did not enable the raw data on my headset. Thanks !
Elite. Honored to hear that you got the Mindflex so you can use Lucid Scribe!
The standard has become to upload images to Imgur and then paste the link…
Have you tried uninstalling the Mindflex plugin and installing the ThinkGear EEG plugin? As discussed with steeph above, the Mindflex plugin only picks up the attention and meditation channels. I would still need to add the code to extract the rest of the channels, but that shouldn’t take much effort at all. So let me know if the ThinkGear EEG plugin doesn’t pick up the other channels, then I will see if I can update it.
After you have hacked the MindFlex, you have to use the Thinkgear Plugin. Out Of the box the MindFlex didn’t send all data. See the link above for how to modify the head band.
Are you able to trigger the audio tracks by looking around / blinking / frowning with the Mindflex?
It’s been some time that I tried it. I think I still haven’t tried it with the version with the updated eye movement detection. Sorry, a lot is happening right now. And I’ve decided to not pursue the tACS think any more for now. So I don’t have an important use for the REM detection/trigger.
I also shelved tACS for now and passed on the equipment to a user who drove to see me to have a look at a faulty Zeo. Give the new eye movement detection a shot with the audio tracks when you get a chance…
Can you please give instructions on how to mod(ify) a mindflex for use with LucidScribe?
I don’t have a Mindflex myself. Perhaps you can make sense of what James wrote here or ask for some more detailed instructions: https://lucidcode.com/LucidScribe/comment-page-1/#comment-1680.
Thank you, that helped.
In short: You just have to connect Ground, Tx and Rx from the ThinkGear AM to a FTDI adapter, that’s all.
Additionally, you may want to mod the TGAM to provide raw EEG data. In that case, you also have to add some solder to the resistor at B1 (the far left one) to connect it to VCC. This can be done without taking the board out of the MindFlex case. See http://wearcam.org/ece1766/neurosky_eeg_brainwave_chip_and_board_tgam1.pdf pages 7 and 8
But then you have to use the NeuroSky ThinkGear EEG plugin, not the MindFlex one.
Elite, thanks for leaving feedback.
I wonder if I just need to update the plugin code to also access the raw EEG data from Mindflex? 83 here: https://github.com/lucidcode/LucidScribe-Mattel-Mindflex/blob/master/Mattel%20Mindflex/PluginHandler.cs#L116-L126.
Well, it would maybe make sense to make one plugin out of both, since they are both for the NeuroSky ThinkGear AM, only in different configurations. But I don’t think it’s necessary. From what I’ve seen, most people are happy with the data the MindFlex provides without this change.
But I think it would be great if the MindFlex plugin could switch the output mode so one wouldn’t have to have a soldering iron. The mode can also be changed via the UART interface. I don’t think I could help though (except with testing), because I’m not a coder.