SpitScreen – Low Fidelity Prototype

With reference to this video:

I built an automated spray bottle with two servo motors taped to a regular spray bottle. Initial tests with smaller servos failed and melted their gearboxes and also my brain. Upgrading to these bigger servos finally squeezed the bottle enough to spray.

For the sneeze detection I used FaceOSC and trained Wekinator with inputs:

  1. mouthWidth
  2. mouthHeight
  3. eyeLeft
  4. eyeRight
  5. jaw
  6. face pose
float x1 = map(mouthWidth, 0.0, 20.0, 0.0, 1.0);
float y1 = map(mouthHeight, 0.0, 20.0, 0.0, 1.0);
float x2 = map(eyeLeft, 0.0, 5.0, 0.0, 1.0);
float y2 = map(eyeLeft, 0.0, 5.0, 0.0, 1.0);
float a = map(jaw, 0.0, 30.0, 0.0, 1.0);
float x3 = poseX;
float y3 = poseY;
float z3 = poseZ;

Wekinator outputs were only 2 gestures: normal and sneeze.
At normal, nothing will happen. (out1)
At sneeze, servo motors will turn 90 degrees to squeeze the bottle. (out2)

Initially, there was a 5-second delay between Processing sending value (1) to Arduino. This was due to myPort.write(value);being in draw(). Once moved into gesture functions, the delay was indiscernible.

void gest1 () { //normal
println("g1");
value = 0;
myPort.write(value);
}
void gest2 () { //sneeze
println("g2");
value = 1;
myPort.write(value);
}

To troubleshoot, I also added keypresses as triggers to send values to Arduino by serial port.

void keyPressed() {
if (key == '1') {
value = 1;
myPort.write(value);

println("g2");
}

if (key == '0') {
value = 0;
myPort.write(value);

println("g1");
}
}

Next steps:

  • Create structure to mount servo motors to bottle
  • Train wekinator for sneeze accuracy with other faces other than my own

Leave a Reply