Mind Patterning
By Rosemary Hattersley. Posted
Michael Darby, aka 314reactor, has been having ideas for electronics projects for as long as he can remember. “As a kid I’d try to make things (with poor results) by badly soldering up circuits. I was just too young to really make it work,” he says.
A lifelong video games and technology fan, Michael picked up his first Raspberry Pi in 2013 and was excited to play around with it and see what he could do with it. After a few false starts, he realised his inventiveness could finally be given free rein. His first big project was a Windows 98 Wrist Watch. Hop forward in time three years and he’s lost count of the number of Raspberry Pi boards he possesses.
Take back control of your online data, with Raspberry Pi.
Since then he’s made several Raspberry Pi projects, including Spider-Man specs – hence his profile pic. His Mind Patterning headset is intended “to kick off a much larger project using mind-reading capabilities.”
The project reads brainwave data with a MUSE headband and uses TensorFlow machine learning to train a model on the data to recognise a relaxed or non-relaxed mind state.

Mind over matter
Michael used a Raspberry Pi 4 for the Mind Patterning project “because it allows lots of applications to run simultaneously.” The Bluetooth setup required for Raspberry Pi to import data from the headset turned out to be one of the trickier aspects of the build since the latter is really designed to work with iOS or Android.
“Using Raspberry Pi was essential for the TensorFlow tech required for training a neural network on the recorded EEG data,” he explains. “The code is where the design and development was [see his GitHub repo]. I used some libraries from elsewhere in order to get the EEG data logged and accessed. So many people use Raspberry Pi and it ensures that there is always support and information out there to learn from and assist,” he notes.
Raspberry Pi 4’s flexibility and processing power meant Michael needed little else to realise his project.“It has so much hardware on board, including the power for the machine learning, which is where the multicore and lots of RAM really helped,” he says.

Trial and error
“Initial testing of the model training and inference was done with the PipelineRunnerTest.py file,” explains Michael. “This creates artificial sets of training and neural network testing data. It calls CSV preprocessing (which loads and trains the model), then runs that against the test data.”
This approach allowed him to see quickly how well the model would work if given real-world data, and to make adjustments. “I was trying to get the raw EEG sensor data at first, but then realised I needed to get the data processed into alpha/beta/theta wave data before passing to the neural net.”
Michael hopes to develop the project to read more mind states, possibly even emotions, and sees future potential for the mind-patterning idea in simulating human responses via a neural network.
“With more tweaking and more data, it could be used to interact with the hardware without having to manually press buttons, but I’m sure Elon Musk’s Neuralink is going to be far, far more effective than anything I could ever do,” he says.
Rosie has worked for consumer tech titles such as PC Advisor, Computeractive, CNET and Macworld and written For Dummies books on using iPads, Androids and tablets
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Take Back Your Clound in Raspberry Pi Official Magazine 165
We’re all-too accustomed to the feling of being watched on the internet. A search for any product leads to adverts, emails, and goodness knows how many bots tracking you. It feels weird and intrusive, and we aren’t being paranoid – they really are watching us. Luckily you don’t have to reply on online services that […]
Read more →
Win one of three Raspberry Pi 4 with 3GB RAM!
Raspberry Pi 4 is still a powerful piece of kit, and this new 3GB version is great for projects and builds that need slightly more than 2GB of RAM but don’t quite need 4GB. We have three to give away and you can enter below. Win 1 of 3 Raspberry Pi 4 3GB
Read more →
Etch A Sketch CNC machine
The software controlling the Etch A Sketch logs the image, turns it into vectors, turns the vectors into G-code, then sends the G-code to the Etch A Sketch – and it was all written by AI
Read more →