Monday, March 26, 2012

Final Progress

I have settled on a project that helps the user see their concentration level in the form of lights. My idea is based on the classic cartoony notion that a lightbulb lights up when the character has an idea. I am in the process of designing said object and writing the code/sketch for the arduino to brighten and fade to the user's concentration level.

Week 10 Flashback

The demo was quite interesting. Seeing how they reacted was a bit amusing. The feedback I got I am using to improve my overall project. I have continued to gather more data for both projects.

Week 9 Flashback

The serial labs have come in handy for understanding the data that the Mindflex uses. I have been actively testing myself with the data and am coming up with some interesting results. Preparing the demo was frought with challenges. First of all debugging the Brain SerialOut sketches which it turns out was relatively easy. All I had to do was change two little words and the program began spitting out number packets every second. Then I tried to upload the sketch into Processing, which I was unsuccessful in doing due to multiple complications storing the right libraries and so on. The week was challenging, but I look forward to showing you the mind actively working and the data being collected at the same time.

Research Update on Final

So I have finalized that I will be using the second Mindflex in a similar fashion to my Instructables. I have begun gathering the data of the various EEG values and am trying to correlate them somehow into a statement/function. Mostly the Delta values have been the highest when I am quietly meditating, but Theta/deep sleep keeps claiming first in any other situation. Seems that the data may have a few bugs in it...

Tuesday, March 13, 2012

Analog Input Labs

To visually see the information being sent out of the computer into the Arduino was quite fascinating. While I was only able to understand the bare minimum of the coding I do know that this information has come in handy with both my final project and my instructables to be able to see the number coding that correlates to different thought patterns within my Mindflex headband. The coding is very similar to the Javascript that I work with in a different class in that there are libraries with more information and functions.

Tuesday, March 6, 2012

toneMelody Sketch in Simple Language


 Plays a melody

 * 8-ohm speaker on digital pin 8

 created 21 Jan 2010
 modified 30 Aug 2011
 by Tom Igoe

This example code is in the public domain.

 #include "pitches.h"

// notes in the melody:
int melody[] = {

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  4, 8, 8, 4,4,4,4,4 };

void setup() {
  // iterate over the notes of the melody:
  for (int thisNote = 0; thisNote < 8; thisNote++) {

    // to calculate the note duration, take one second
    // divided by the note type.
    //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
    int noteDuration = 1000/noteDurations[thisNote];
    tone(8, melody[thisNote],noteDuration);

    // to distinguish the notes, set a minimum time between them.
    // the note's duration + 30% seems to work well:
    int pauseBetweenNotes = noteDuration * 1.30;
    // stop the tone playing:

void loop() {
  // no need to repeat the melody.


This sketch programs the Arduino to play a sound or melody in accordance to the notes written. The circuit uses an 8-ohm speaker that is set to be plugged into pin 8 on the Arduino. The code already shows that it references "Pitches", the various sounds that Arduino can call upon. The numbers 4 and 8 refer the types of musical notes; a quarter note and an eighth note. The sequence of numbers equivalates to a sequence of musical notes. In the parenthesis, that is a for statement, which tells the Arduino a rule. The duration tells the Arduino how long to play the sequence for. The pause statement tells it how long, if any, the pause inbetween each number/note lasts. The last line in the main bracket tells it to stop the sequence. Void loop means that the sequence only plays once and does not repeat.

Relay Lab

Soldering the wires to the relay was a bit difficult by myself, fortunately a fellow classmate was eager to lend me his hands. I almost soldered the wrong wires to the switches, fortunately I didn't. Then I had to separate one of the wires from the lamp and cut it, which by the way was quite thick with insulation. Then I had to tie the relay wires to the exposed wires then tape them together. I programmed a sketch into the Arduino that simulated a racing heartbeat and was excited to see the light flicker to the sketch. But when it came time to test my light would not turn on. Turns out that the contacting wires were not contacting. With a simple press of my fingers the light blinked in unison to the clicking Relay and I was satisfied.

Instructables Update

I am still awaiting payment for the remaining parts of the tail. I am seriously considering making my own spine components using the MakerBot software due to difficulties trying to locate the specific LEGO pieces or Klixx parts. I am still planning out the Arduino Sketch for the controls. The MindFlex is still being tested with and I am constantly training my mind to concentrate at certain levels so that I can fully master the control for when it comes time to use it on the tail.

Technologies for Final Project

I am pursuing something that will be reactive to a person's prescence and make a noise in response. I will be needing to find a light sensor and motion sensor. Perhaps I will embody this technology into a stuffed animal since I really enjoyed the Blinking Light project from earlier.

Week 8 Flashback

The critique was quite useful for me and I know that I should have covered the battery instead of let it hang out the back. The lab was interesting and a tad dangerous when it came to splicing the wires off my lamp and tie them to the relay's wires. I already shocked myself twice holding the two parts together when the taping I had previously done to secure them failed. But so see the light flickering to the sketch I had written was stunning and quite entertaining.