We sought to create a way for distant individuals to transfer the warmth of their hand to one another through the simulated holding of hands!

0

Overview

One of the most difficult things to simulate with technology, is the caring touch of a fellow human being.  One of the most simple pleasures in life is holding the hand of someone you care about.  We designed a revolutionary device to meet that need.  When one person grasps the prosthetic hand of their device, the other person's device glows to represent the warmth of their distant friends hand.

0

Process

While we initially began with a complex breakup facilitation device, we quickly realized that the world had enough things in it to aid in burning bridges.  So after some deliberation, we decided to create a virtual hand-hold.  Using the larger temperature sensor and a RGB LED (for its brightness), we were able to construct a simple circuit.

Components:

1 - Photon

1 - RGB LED

1 - DS18B20 (waterproof)

1 - 4.7kΩ resistor

0

We spent approximately 20+ hours attempting to write successful code for this device.  The objective was simple; obtain the temperature reading, and link it to the brightness of the paired LED.  The execution was a horrifying deluge of compilation errors, idiosyncrasies, and unforeseeable behaviors.  After many rewrites and the assistance of several classmates, we saw success.  The basic code uses the Dallas libraries to derive a temperature, and some inspiration was taken from the structure of class examples.  Ultimately, the code was its own hideous beast of uniquely forsaken origins.

0
#include "OneWire.h"
#include "spark-dallas-temperature.h"
OneWire oneWire(D0);
DallasTemperature dallas(&oneWire);

const String myID = Particle.deviceID();
const int ledPin = D1;
int ledValue = 255;
int friendTempMapped = 0;
int myTempMapped = 0;
float myTempRawPrev = -1;
double temperature = 0.0;

const String eventName = "80085-temp-change"; 
int tempLowerBound = 20; 
int tempHigherBound = 30; 

void setup(){
  Particle.variable("temperature", &temperature, DOUBLE);
  /*Particle.function("led", updateLed);*/
  analogWrite( ledPin, ledValue);
  dallas.begin();
  pinMode(ledPin, OUTPUT);
  Particle.subscribe(eventName, eventHandler);
  Serial.begin(9600);
}

void loop(){
  monitorSensor();
  updateLed();
}

void eventHandler(const char *event, const char *data){
  String dataString = String(data);
  int delIndex = dataString.indexOf(',');
  String firstValue = dataString.substring(0, delIndex);
  String secondValue = dataString.substring(delIndex+1);

  String theID = firstValue;
  int theTemp = secondValue.toInt();
  if( myID != theID ){
    friendTempMapped = theTemp;
  }
  Serial.println("***RECEIVED DATA***");
  Serial.println("theID");
  Serial.println(theID);
  Serial.println("theTemp");
  Serial.println(theTemp);
  Serial.println("-------/-----/---5----/--/------");
}

int monitorSensor(){
  dallas.requestTemperatures();
  float myTempRaw = dallas.getTempCByIndex(0);
  temperature = (double)myTempRaw;
  if( abs(myTempRaw - myTempRawPrev) < 10 || myTempRawPrev == -1 ){
    myTempRawPrev = myTempRaw;
    int myTempRawSnapped = constrain(myTempRaw, tempLowerBound, tempHigherBound);
    myTempMapped = map( myTempRawSnapped, tempLowerBound, tempHigherBound, 255, 0);
    String dataToSend = myID + "," + myTempMapped;
    Particle.publish(eventName, dataToSend);
    Serial.println("***LOCAL DATA***");
    Serial.println("myTempRaw");
    Serial.println(myTempRaw);
    Serial.println("myTempMapped");
    Serial.println(myTempMapped);
    Serial.println("tempLowerBound");
    Serial.println(tempLowerBound);
    Serial.println("tempHigherBound");
    Serial.println(tempHigherBound);
    Serial.println("-------/-----/---5----/--/------");
  }
}

int updateLed(){
  ledValue = friendTempMapped;
  if( ledValue > 255 || ledValue < 0 ) return -1;
  analogWrite(ledPin, ledValue);
  return 1;
}
Click to Expand
0

After stuffing the temperature probes into a couple of foam reinforced nitrile gloves, a fully realized device was born.

Unimaginable intimacy awaits you...

0
Connected Hands
Jonathan Sharrah - https://youtu.be/gYX-mLbTK60
x
Share this Project

Courses

49-713 Designing for the Internet of Things

· 4 members

This course charts the emergence of the now "connected world" to explore the possibilities for future products and connected spaces.


Focused on
About

We sought to create a way for distant individuals to transfer the warmth of their hand to one another through the simulated holding of hands!