Sensehandrail

Watch senseHandrail video clip

/* senseHANDRAIL v1.0 by Raf Godlewski OCT 8 2008 Media Robotics I This code uses inputs from two temperature sensors mounted inside of a handrail and displays the difference in their reading using LED's. It is meant to make users of the space where the handrail is installed aware of the temperature of the space, temperature of thier own, and temperature of others. The handrail is made of aluminium which has a specific heat dissipation/absorption qualities and provides a delay in the reaction to changing temperature. This delay is caused through a material quality rather than through code. This project is part of Situated Technologies Research Group at the University at Buffalo, in an effort to investigate an interface between the humans and an architectural space. This code works as intended although the handrail originally was imagined to gather more biometrical information such as heart rate, skin resistivity and galvanic skin response. The next version will attempt to gather more data and instigate a change in the environment, thus producing a feedback loop between the users and the space. */ int tempPin0 = 0; // select the input pin for the TEMPERATURE sensor 0 (left hand) int tempPin1 = 1; // select the input pin for the TEMPERATURE sensor 1 (right hand) int valT0 = 0; // variable to store the value coming from temperature sensor 0 int valT1 = 0; // variable to store the value coming from temperature sensor 1 int adjT0 = 0; // variable to store the adjusted value of temperature sensor 0 int adjT1 = 0; // variable to store the adjusted value of temperature sensor 1 int LB1 = 9; // select the pin for the LED - BLUE 1 int LB2 = 10; // select the pin for the LED - BLUE 2 int LB3 = 11; // select the pin for the LED - BLUE 3 int LG1 = 3; // select the pin for the LED - GREEN 1 int LG2 = 5; // select the pin for the LED - GREEN 2 int LG3 = 6; // select the pin for the LED - GREEN 3 int DIFF = 0; // difference between temperature sensors void setup() { // open serial communications and set LED pins to output Serial.begin(9600); pinMode (LB1, OUTPUT); pinMode (LB2, OUTPUT); pinMode (LB3, OUTPUT); pinMode (LG1, OUTPUT); pinMode (LG2, OUTPUT); pinMode (LG3, OUTPUT); } void loop() { // read temperature sensors valT0 = analogRead(tempPin0); // read the value from sensor 0 valT1 = analogRead(tempPin1); // read the value from sensor 1 // reverse and adjust temperature readings ( the values from the sensors are not // the same in the beginning - one has been adjusted by 15 points. They also increase // the resistivity as temperature increases. // This in turn produces decreasing valuse as temperature increases. This switches that // relationship. // Adjusted sensor reading at 72 deg F is 470, at 83.3 deg F it is 505. This gives an average // of 3 "points" per deg F. adjT0 = 1023 - valT0 + 18; adjT1 = 1023 - valT1; // print temperature results PrintValues(); //define difference between the temperature sensors and store it in variable DIFF DIFF = adjT0-adjT1; // turn on LED's based on that difference and create a scale/range which displays the // change in the environment/body // this blinks all LEDs when the difference is within 3 points if (DIFF>-2 && DIFF
Video hosted by Vimeo

Recommended Videos