Built as an alternate scene, you have basic functionality including space and delete. Carriage returns still need development, and maybe a more intuitive or creative interface. Code will follow, once functionality has been improved.
Setup Wizard / Hud Design Concepts
Here are some design concepts for two important elements of the EyeWriter software. We imagine a setup wizard will allow first time users to get up and running with the software. The wizard will take the user through essential procedures, such as camera source setup, and various image / tracking adjustments. The next element would be an overall functionality review, and concept design for the HUD portion of the software.
Setup Wizard -
** Updates:
EyeWriter Pointer Control Scheme / HUD (PDF)
—
HUD Concept -
—
Interface References -
Flip flop circuit
Kyle McDonald gave us the tip to try a flip flop switch using this schematic and photo:
We started to build the circuit based on his photo and then realized he had a 14 pin chip (DM74ALS74A Dual D Positive-Edge-Triggered Flip-Flop) and we have a 16 pin chip (SN74174 HEX/QUADRUPLE D-TYPE FLIP-FLOPS WITH CLEAR).
So now we’re doing research learning more about the flip flop chip (how the pins correspond on a dual to a quadruple flip flop), and we hope to have a working circuit soon.
- Ito, Lee, Lien
More VSYNC tests
We did more tests with Arduino (in this case, an Arduino mini), this time with two LEDs hoping to see the LEDs alternately flickering based on the VSYNC signal rate. Once we uploaded the below code to Arduino we were able to see that both LEDs were flickering on and off, but we couldn’t be sure if they were exactly alternating. We did a recording with macam, but actually the video couldn’t capture the LEDs alternatively turning on and off. The macam video rate is 30 frames per second, and we suspected that this was too slow to capture the flicker frame by frame and/or the macam by default has some smoothing effect.
Arduino Source Code::
===============================
// constants won’t change. They’re used here to set pin numbers:
const int vPin = 2;Â // the number of the VSYNC digital pin
const int led1 = 13;Â Â Â Â Â // the number of the first LED pin
const int led2 = 12;Â Â Â Â Â // the number of second LED pin
// variables that will change
int vState = 0;Â Â Â Â Â // variable for reading the VSYNC status
int prev = 0;Â Â Â Â Â Â Â // variable used to check vState and turn on/off respective LEDs
int count = 0;Â Â Â Â // variable used to check vState and turn on/off respective LEDs
void setup() {
// initialize the LED pin as an output:
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(vPin, INPUT);
//Serial.begin(9600);
}
void loop(){
// read the state of the pushbutton value:
vState = digitalRead(vPin);
// check for VSYNC signal state
// if vState is HIGH:
if (vState == HIGH && prev == 0) {
count++;
count = count % 2;
prev = 1;
} // end if
else if (vState == LOW) {
prev = 0;
} // end else if
if (count == 1) {
digitalWrite(led1, HIGH);
digitalWrite(led2, LOW);
}// end if
else {
digitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
} // end else
}
====================================
Instead, we tried capturing video of the LEDs using openFrameworks where we could set the frame rate. The following three videos show screen flow from openFrameworks with frame rates of 30, 60, 120 frames per second, respectively. (Since the 30 fps video pretty clearly shows the LEDs alternating on and off, we believe there is something specifically happening with the macam that interferes with capturing this flickering.) All in all, we feel confident that the LEDs are indeed alternating on and off based on the VSYNC signal, but looking at these three videos you’ll see slight variation on the flickering. We’re not quite sure why, anyone have thoughts? The processing of live video to screen is tying up the signal. As Kyle’s suggested, we’re now saving files as we test and then looking at them later, which takes up less resources.
- Ito, Lee, Lien
Head Mount + Projector
In order to try different ways to solve the “head moving” issue for the calibration of the eye writer, we considered that it could be an interesting possibility to try attaching a projector to the head mount so that the positioning of the eyes would always be proportional to the projection. The experiment worked really well in terms of precision but if it is going to be taken into account for further experimentation, there are a couple of things that need to be taken care of:
- The projector adds some weight to the head mount that can end up being somewhat uncomfortable.
- The ventilation system of the used projector was very active and vibrated a lot.
Other than the aforementioned problems, this approach looks interesting for anyone who could possibly need an eye writer and wasn’t necessarily motionless.
PS3 EyeCamera VSYNC
At first we’d hoped to use an oscilloscope to find the length of the PS3 camera frame pulse, but the only oscilloscope at Parsons was a really old one with a parallel port connection. We tried to find a converter to USB but to no avail. Luckily Kyle McDonald’s documentation includes an image of the pulse.

Since we knew the pulse length of the VSYNC the next step was to see if we could use Arduino to “see” the pulse with an LED. Here is the VSYNC on the PS3 Camera.

We connected one end of a wire to digital pin 2 on an Arduino board with the other end touching the ring of the EyeCamera VSYNC. (Note: we used 22-gauge wire to connect to Arduino and then hot glued to the other end wrapping wire, which was small enough to only touch the VSYNC ring.)Â We connected an LED into digital pin 13 on an Arduino board, which we used to “see” the pulse from the VSYNC. Below is the code. (We tried to take a picture or video of the LED pulsing, but we weren’t able to capture it.)
We also tried outputting the pulse rate using the pulseIn() function in Arduino, but we had a couple issues. First, Arduino documentation says pulseIn() is not very accurate. Second, when we added Serial.print lines to output the pulse length it conflicted with the pulse and we couldn’t see the LED’s fast pulse.
/*********** ARDUINO CODE ***********/
// set pin numbers
const int vPin = 2; // the number of the VSYNC digital pin
const int ledPin = 13; // the number of the LED digital pin
// variables will change
int vState = 0; // variable for reading the VSYNC status
void setup() {
// initialize the LED pin as an output
pinMode(ledPin, OUTPUT);
// initialize the VSYNC pin as an input
pinMode(vPin, INPUT);
} // end setup
void loop(){
// read the state of the VSYNC value
vState = digitalRead(vPin);
// check if the state of VSYNC
// if it is HIGH
if (vState == HIGH) {
// turn LED on
digitalWrite(ledPin, HIGH);
} // end if
else {
// turn LED off
digitalWrite(ledPin, LOW);
} // end else
} // end loop
/*********** END OF CODE ***********/
04.10.10 UPDATE: Wiring to the PS3 Eyecamera VSYNC (more photos to come)
Now that we’ve tested the VSYNC signal, it’s best to glue the wrapping wire to the VSYNC on the Ps3 Eyecamera.
1. Use hot glue to connect 22-gauge wire to wrapping wire. Let dry.
2. Take the other end of the wrapping wire, and touch it to the VSYNC ring. If you have a newer PS3 Eyecamera, you may need to scrap the paint finish to expose the metal VSYNC ring. You can do this with a small screwdriver, drill bit, etc.
3. Test to make sure the wire is making stable contact with the VSYNC ring and only the VSYNC ring. (We tested this by setting up the Arduino circuit and using the above code. The LED flickers at the VSYNC rate when contact is made.) Also make sure that the part of the wrapping wire that meets the edge of the camera is stable. Ideally this part of the wire should not be stripped and should be laying flat against the camera. This is to ensure that the wire won’t move and is always touching the VSYNC ring.
4. Put hot glue on top of the VSYNC ring and also the wrapping wire all the way to where it meets the camera edge. Do this with the Arduino circuit still running so you can confirm that the wire is still making contact to the VSYNC. Hold the wire in place until the glue is mostly dry. To test if it’s dry enough, let go of the wire; if the LED is still flickering at the same rate as the VSYNC signal, then you can leave it to dry all the way; if the LED is not flickering at the right rate, then you have to adjust the wire until it does and then hold it in place again.
Click here for more on the VSYNC.
- Ito, Lee, and Lien
Mac HUD Software
The HUD Software for Mac is up and running, aside from the on going difficulties figuring out how to simulate a double-click. Strategies have included:
- sending two left clicks back to back
- sending two right clicks back to back
- changing click count (one thread that talks about it is here)
See the demo-video here:MACEyeWriterVideo
and the code here:CustomView (header), CustomView(.m as .txt)
code as zip: mac mouser
Head mount prototype
I’ve been working on creating some adjustable parts complete to mount the eye writer camera on. They were planned to fit perfectly into each other but they still need some tweaking. Here are some pictures of how it looks and the illustrator file used to laser-cut the parts. With this prototype I’ve identified a bunch of tiny problems that make it a little unreliable but they are easily fixable and I’m working on the second iteration.
Testing glint
Glint team: Lee, Ito, Lien
We tested out flooding area with IR and using a smaller IR light by the mount (glasses) to remove shadows from top eyelid and eyelashes, which otherwise make it difficult to isolate the pupil because the shadow blends with the pupil.
We set up a large IR light facing the user and places a dimming IR LED on the cheek. While the IR LED on the cheek removed the shadow, in most cases it created another glint.
The following video shows the best result with minimal glint from this IR LED (though there is still some glint at very top and/or bottom of eye). In this video you see the eye moving randomly around and then looking at the four points of a screen.
The following video is the best case scenario we could get using the EyeWriter software. We used settings that best isolate the pupil and glint with some issues when the eye is looking at the extreme points of the screen. The next step is to test this out with the glint detecting software to see how much the additional LED affects tracking.

































