Close

TvGlove 2.1.4

A project log for ATLTVHEAD

Atltvhead is a mashup of interactive art and wearable technology with a message of positivity and encouragement to let your oddities shine!

nate.damennate.damen 10/06/2018 at 20:270 Comments

The high five portion of the Tvglove is working! Check out the recap from this weeks stream, many high fives to featured there.


The functionality that I want to get out of the glove is to have a physical action effect the chat. Right now, the chat controls the tv screen, but a high five can alter what/how chat can manipulate it for a period of time. Think of it as party mode. As I am working on the code for that, below is my code for the capacitive sensors in the glove.

Capacitance changes, basically on the time. I code in a dry environment, but get sweaty in an already humid Atlanta. It is also a wearble, meaning my own capacitance can trigger the sensor. The capacitance of the glove must react, becoming more or less sensitive. ESP32 allows for variable control the sensitive, in this case called threshold. The lower the threshold, the more less sensitive the sensor.  My thought to decrease sensitive is based on the idea of a high number of false triggers occur in very quick session. The function gotTouch1 is an interrupt function, only taking place when the sensor fires. I kept a count of the number of times the sensor is triggered and the time between triggers. As the number of triggers get higher and the time decrease, decrease sensitive. On the opposite end, if nothing happens for a minute, increase the sensitivity. I should end up with some oscillation around a working threshold. A real high five takes place between these short triggers, and a minute (where I will readjust sensitivity).

It is nice, because the sensors are constantly calibrating, allowing it to be reliable as I walk indoors to outdoors, and take the glove on and off.

int threshold = 60;
bool touch1detected = false;
byte touchCount = 0;
unsigned long touchTime;
unsigned long oldTouchTime;

void gotTouch1(){
//figure out calibration here!
//get time and incriment timer
touchTime = millis();
touchCount++;
// if counter is above a certain # in a certain timeout decrease sensitivity (time is going to be half second)
if(touchCount >=3 && (touchTime-oldTouchTime)<=400 && threshold > 20){
  threshold=threshold-1;
  // reset count
  touchCount=0;
  }
// if counter is below a # and a certain timeout increase sensitivity (time is going to be 2 min?)
else if((touchTime-oldTouchTime)>=60000){ // touchCount<1 && probably doesn't need the <1 touch count. if it creates too sensitive of a sensor, it will be backed off imediatly after. it should jut create more triggers after the high five
  threshold++;
  // reset counter
  touchCount=0;
  }
// if counter is below # and timer is between sensitivity triggers touch detected
else if(400<(touchTime-oldTouchTime) && (touchTime-oldTouchTime)<60000){
  touch1detected = true;
  delay(500);
  // reset counter
  }
// time saved to new variable and reset
oldTouchTime = touchTime;
}

.

I also decided to rebuild the tvglove. A problem of the old sensor is that the area for capacitance was too large, so I made smaller patches of sensors. 3 on the palm and one on the knuckles,

I used Silver conductive fabric, allowing for some tricky, but totally doable soldering!!

I I stitched all the sensor pads in with regular thread, and sewed some of the cabling as well. This helps with repeated bending of the solder joint.


I soldered the wires to pins T6 and T0 for now of the esp32. The code up above and the new sensor pads did the trick!

Discussions