Mind-Controlled Microcontroller

Your Mind-Controlled Light Switch, on a Raspberry Pi Pico 2 W.

On the Mind-Controlled Light Switch demo you teach a custom AI head two states, resting and a thought you hold, and install it on your IntoMind One, which runs it on its own chip. One small program lets a Raspberry Pi Pico 2 W, a microcontroller board with Bluetooth and an LED, connect to your IntoMind One by itself and turn its LED on while your custom AI head reads On. No computer in the room.

You need

A Raspberry Pi Pico 2 W. The Pico 2 without the W has no Bluetooth.

A micro USB cable that carries data. Some cables only charge.

A computer with a USB port.

Your IntoMind One, with a custom AI head installed from the Mind-Controlled Light Switch demo.

Steps

01Teach your custom AI head

On the Mind-Controlled Light Switch demo, teach your two states, then press Run it on your IntoMind One. Your custom AI head, the small model that tells your two states apart, is now installed on your IntoMind One.

You should seeThe board drawn on the demo lighting up while you hold your On thought.

02Download the program

One file holds the whole program for the board, ready to run. Its source is on this site for anyone who wants to change it.

Download the program

You should seeA file named light-switch-pico-2-w.uf2.

03Put it on the board

Hold the white BOOTSEL button while you plug the board into your computer, then let go. Drag the file onto the drive that appears.

You should seeA drive named RP2350 that closes by itself once the file is on it, then the LED blinking once a second. A Mac may warn that the disk was not ejected properly. That is expected.

04Turn on your IntoMind One

Take it off its charger and put it on, and close any tab connected to it. The first time, the board pairs with it, and from then on it remembers it.

You should seeThe LED stops blinking, then comes on while you hold your On thought.

05Put the board anywhere

Unplug the board from the computer and power it from any USB charger. It finds your IntoMind One by itself whenever it has power.

You should seeThe LED, saying one of the six things shown beside the board.

If it does not work

No drive appearsThe cable may only charge, or BOOTSEL was let go too soon. Try another cable, and keep holding the button until the drive shows.
The drive closes, but the LED never blinksThe file did not land. Hold BOOTSEL, plug in again, and drag the file once more.
One short blink a second, and it never stopsYour IntoMind One is off, or another tab is connected to it. Close the other tab, or switch your IntoMind One off and on again.
Two short blinks a secondYour IntoMind One is on its charger, and it sends no EEG while it charges. Unplug it.
Three short blinks a secondNo custom AI head is installed on your IntoMind One. Do step 01.
Fast blinkingYour IntoMind One lost the signal for a moment. Settle it so every electrode touches the skin.
The board goes dark on a power bankMany power banks switch off when so little power is drawn. Use a wall charger, or a power bank with an always-on mode.
The light trails your thoughtThat is expected. Your custom AI head reads four seconds of EEG at a time, so the light changes a reading or two after you do.

Build on it

The program is plain C on Raspberry Pi's own toolkit for the board, and it marks where your own code goes. The code to switch a pin is already there, commented out: pin GP15, the board's pin 20, with ground on pin 18. Uncomment it and rebuild, and the pin goes high, to 3.3 volts, while your custom AI head reads On: a signal any circuit, robot or project of your own can act on.

The source is board/main.c, and the build steps are in board/README.md.

Source · board/main.cUnplug the USB-C cable before wearing your IntoMind One.