BIOSENSING
makezine.com/26/primer
2. CONTROL HARDWARE WITH YOUR MIND
Now let’s read your brain waves into an
Arduino to directly control hardware with
your mind! Doing this involves a pair of
Arduino programs: MindSetArduinoReader,
which uses MindSet input to light LEDs while
also writing the data out to a CSV (
comma-separated values) serial data stream, and
MindsetArduinoViewer, which reads live from
the CSV serial stream and plots its data.
2a. Turn off your MindSet, then use jumper
wires to wire up your breadboard with an
Arduino, BlueSMiRF, and LEDs, as shown in
Figures M and N, with the Arduino’s digital
I/O pins running to a 10-segment bar LED.
L
PROGRAMMING MODE
M
2b. Follow the instructions at makezine.com/
26/primer to program your BlueSMiRF
module with the specific MAC (media access
control) address of your MindSet, using the
Arduino sketch CleanProgramBlueSMiRF.pde.
You’ll open the CleanProgramBlueSMiRF
sketch in the Arduino IDE and set your Board
and Serial Port under the Tools menu. Then,
change the MAC address (mac[ 13]) so that it
reads your MindSet’s MAC address, which
can be found labeled on the MindSet or in
your Bluetooth settings. Upload the program
to the BlueSMiRF.
CleanProgramBlueSMiRF should start the
single LED blinking on Arduino I/O 13 (Figure M,
small red component, left side of breadboard).
If the program fails, I/O 13 will not flash and
the bar LED will light up to indicate where in
the program sequence it failed. If this happens,
try programming a second time.
TX/RX
connected
PROGRAMMING MODE
2c. Disconnect the RX pin on the BlueSMiRF
(TX on Arduino) to enter Run mode (Figure O).
Download the MindSetArduinoReader folder
from makezine.com/26/primer, extract it,
and open MindSetArduinoReader.pde in the
Arduino IDE. With your Arduino cabled to your
computer, verify and upload the sketch.
Arduino TX /
BlueSMiRF RX
connected
Arduino Duemilanove
BlueSMiRF
N
Photograph by Sean Montgomery
110 Make: makezine.com/26