October 31, 2006 • 4:08 am

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
October 28, 2006 • 10:07 pm
bought a pedometer at Kmart for $10.

hacked, figured the arm part that increase the count.

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?)

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
October 26, 2006 • 10:45 pm
October 24, 2006 • 4:19 pm
time-based visualization with thermistor comparison

map-based visualization with thermistor comparison

Filed under: Computers for Rest of you
/* 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
October 19, 2006 • 2:40 am

found at the corner shop of orchard/broome
keys: keep your wallet safe
Filed under: fascination, scribbles
October 18, 2006 • 5:58 am






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
October 16, 2006 • 4:05 am
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
October 11, 2006 • 1:52 am
this is the final controller box for pong game.

and this is the arduino board inside of the box.

Filed under: Networked Objects, pcomp