oh blog

Icon

i rant cherish and archive my memories here

pedometer take2

pedometer take2

with tom’s advice, decided to connect one end of a switch to 5V of arduino board and the other end to the input pin(with 10k ohm pull down resistor).

since the circuitry on pedometer was not exactly a switch but a connection between ground to power to give a reading to a display, i kept the circuitry for the sake of keeping the display, then needed to put a seperate wire as an end of switch. (the one that connects to the input pin)
for the arduino code, added a simple counter that counts the steps with pedometer. had to figure out to limit/slow down the reading as it counted multiple times with one click of a switch. Therefore, put ’status’ variables, and also ‘delay’ to put some breaks between the readings.

<arduino code>

—————————-

/* pedometer with simple counter
jane oh
10.30.06
*/

int ledPin = 3; // choose the pin for the LED
int inPin = 2; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
int counter = 0;
int currentState = 0;
int preState = 0;
void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inPin, INPUT); // declare pushbutton as input
Serial.begin(9600);

digitalWrite(ledPin, HIGH); //blinkie
delay(200);
digitalWrite(ledPin, LOW);
delay(200);
digitalWrite(ledPin, HIGH);
delay(200);
digitalWrite(ledPin, LOW);
delay(200);

digitalWrite(inPin, LOW);
}

void loop(){
val = digitalRead(inPin); // read input value
if (val == HIGH) { // check if the input is HIGH (button pushed)
digitalWrite(ledPin, HIGH); // turn LED ON
currentState = 1;
}
else {
digitalWrite(ledPin, LOW); // turn LED off
currentState = 0;
}
if (currentState != preState){
if (currentState == 1){
counter = counter + 1;
Serial.print(counter, DEC);;
delay(500);
}
}
preState = currentState;
}
———————————-

Filed under: Networked Objects, pcomp

pedometer take1

bought a pedometer at Kmart for $10.

pedometer
hacked, figured the arm part that increase the count.

pedometer
to read out the digital count value (simple swich form), set up the switch circuit (with pull-down resistor).

connect pedometer’s gound to the board to give common ground.(make sense?)

pedometer hack
tried to set up transistor to pull up voltage from 1.5V to around 5V to give signal to arduino, but unsuccessful. maybe should try to give extra power instead. Or, amplifier!

Filed under: Networked Objects, pcomp

Tip120 transistor

1 Base 2 Collector 3 Emitter (http://www.learn-c.com/tip120.pdf)

1. output through 10k?

2. input

3. ground

2 & 3 diode


Filed under: pcomp

[project_Gratitude] Thermistors viz

 time-based visualization with thermistor comparison

time

map-based visualization with thermistor comparison

map

Filed under: Computers for Rest of you

[project_Gratitude] final Thermistors arduino code

/* two thermistor comparison

Jane Oh

10/23/06

*/
#define t 30  //smooth time – get rid of the noise
int tempPin1 = 1;    // select the input pin for the thermistor
int tempPin2 = 2;
int ledPin = 13;   // select the pin for the LED
int temp1[t];       // variable to store the value coming from the sensor
int temp2[t];
int avgTemp1 = 0;
int avgTemp2 = 0;
long current = millis();
//variables for threshold set up
int thre = 0;
int thre1 = 0;
int thre2 = 0;
//int threT = 100;
int sensitivity = 25;

void setup() {
pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT
digitalWrite(ledPin, HIGH);
delay(200);
digitalWrite(ledPin, LOW);
delay(200);
digitalWrite(ledPin, HIGH);
delay(200);
digitalWrite(ledPin, LOW);
delay(200);
Serial.begin(19200);        // use the serial port to send the values back to the computer
}

void loop() {
temp1[t] = analogRead(tempPin1);
temp2[t] = analogRead(tempPin2);    // read the value from the

//set the threshold
if(current <= 5000){
//for (int i=0; i <= current; i++){
thre1 += temp1[current];
thre2 += temp2[current];
thre1 = thre1 / current;
thre2 = thre2 / current;
thre = abs(thre1 – thre2) + sensitivity;
//}
}

for (int counter=0; counter <= t; counter++){
avgTemp1 += temp1[counter];
avgTemp2 += temp2[counter];
}
avgTemp1 = avgTemp1 / t;
avgTemp2 = avgTemp2 / t;

/*
Serial.print(avgTemp1, DEC);
Serial.print(44, BYTE);    //comma
Serial.print(avgTemp2, DEC);
Serial.print(13, BYTE);    //comma
delay(100);
*/

if (abs(avgTemp1 – avgTemp2) >= thre){    //when there’s a signicant change, blink and send serial
//    Serial.print(thre, DEC);
//    Serial.print(44,BYTE);
Serial.print(abs(avgTemp1-avgTemp2), DEC);
Serial.print(44, BYTE);    //comma
}

/*else{
digitalWrite(ledPin, LOW);
}*/

}

Filed under: Computers for Rest of you, pcomp

[final]

internet

television

internet2

ideas:

– a rewarding networking system that corresponds to digital modern lifestyle.

 

implications:

– awaken people of the importance of analogical life – with the help of technology

– what are we missing out from in digital era?

-> physical interaction with world and people

-> touch. taction. physical ‘real interaction’

 

system rules:

– steps you make in a day -> the amount of time to power up your TV

– time you physically spend with people -> the amount of time for the internet access

 

technical solution:

- pedometer, accelerometer

- bluetooth (bluesmirf)

- Nokia N80 for data logging

- logging system to count time of interaction: automotive logging with sensors or manual logging with a switch?

- Sensors in consideration: FSR for the touch on hands, PIEZO for a throat vibration, capacitance sensor to detect physical contact

research on pedometer/accelerometer:

http://www.sparkfun.com/commerce/categories.php?cPath=23_80

http://walking.about.com/cs/measure/tp/pedometer.htm

http://www.pedometerdirectory.com/Results.aspx?query=Pedometer&sessionid=decmf245bx55gtf5gxi4ig45&cc=us&ns=1&eas=yiSgNrj04V*duuGLsdTg7g..

Filed under: Networked Objects, pcomp

material#1 ‘keys’

keys

found at the corner shop of orchard/broome

keys: keep your wallet safe

Filed under: fascination, scribbles

[project_Gratitude] final pouch for the module

it is designed to be worn on the upper arm where i figured the most reasonable to place the sensors around the arm and to the ear, and also comfortable to wear during the day.

i will try to put angled headers for bluetooth so that it erects upward rather than sticking horizontaly like now.

Filed under: Computers for Rest of you, pcomp

[project_Gratitude] two Thers & one GSR

built a board with two thermistors and one GSR(Galvanic Skin Response) sensor.

for GSR sensors, referenced Chris Kairalla’s wiki(http://www.funnydata.com/gsr) and research page(http://www.plazaearth.com/usr/gasperi/gsr.htm). Used velcros as suggested for a convenience of mobility.

and for thermistors, attched one to earing holder so that it can stay on the back of a ear when worn. for another one, am considering a wristband if it gets to be worn around wrist as planned before, but still considering some other spots as well.

and the board with sockets for secure connection of sensors.

also changed wires to ribbon cable wires to give comfortable flexibility when worn.

Filed under: Computers for Rest of you, pcomp

Pong Controller – Joystick

this is the final controller box for pong game.

and this is the arduino board inside of the box.

Filed under: Networked Objects, pcomp

Twitter updates

del.icio.us