Thursday, December 17, 2015

Final Semester Project

As I had suspected, the "final" presentation of this work still felt very much in-progress. Most of my worktime was spent wrestling the circuit itself, working with Charlie, Jason Huang, and eventually Luis Cruz just to get a usable signal. For the time, this signal was simply not going to work REM eye movement -- the signal was too fast and small for this circuit which is why labs have the nice $3,000 amps, I suppose.

Working so long on getting a signal left me choked for time programming in the game engine to create an .exe to interface with the signal. The current build I had of the labyrinth just didn't really show much with the signal I had so I did a quick makeover to a simple object based programming that moved sprites left or right according to the signal.

For the presentation of the project I took a more performative approach. I hooked up James in the computer lab to the electrodes and gave him instructions to follow my finger with his eyes, shined a light in one eye at a time, etc. At this time the circuit did not work. There are many possible reasons, but the most prominent were the potential additional noise present in the electronics of the computer lab, James was actually sweating a little and that can have a big impact, or some other unforseen change between my testing at home and then running it in the lab. As a side note, the circuit works best with very strong eye movement in one direction or the other, and works the most clearly when you close one eye or the other. James was biologically unable to close his left eye without closing his right eye, so that didn't help either. It's okay James; maybe your children won't inherit that gene so I can experiment on them.

Running it as a performance, shoddy as it was in the setting and context of time, definitely gave me some great ideas on how to tweak it as I lock down the signal.

Overall, dissatisfied with the current state of the project as a work of art, but as a progression toward something greater I am very happy to have a lot of the groundwork laid out. With the elements I have it is just a matter of spending more time calibrating the circuit, adding filters, and working on the executable.

Here are some photos taken by Kelsey while I subject James to weirdness:


Attached to this post is the .exe
EOG.exe


Arduino Leonardo Code:
//read electrode signal on pin A0
int analogpin={A0};
int threshold=500;

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  //start keyboard library
  Keyboard.begin();
}

void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
{
//If the electrode signal has a high voltage, the wearer is looking Right.
if (analogRead(analogpin)>threshold)
{
  Serial.println("RIGHT");
  Keyboard.write(0xD7);
}
//If the electrode signal has a low voltage, the wearer is looking Left.
if (analogRead(analogpin)<threshold)
{
  Serial.println("LEFT");
  Keyboard.write(0xD8);
}
//Otherwise play static animation; this will likely never really happen in this instance.
else
Serial.println("STATIC");
}
delay(500);
}

No comments:

Post a Comment