Skip to content

Body Sensing Sketch

September 20, 2010
int breath ;
int light ;
int heat;
int sweat;
int posture;
int electricity;
int led = 9;
void setup() {
Serial.begin(9600);
//Serial.println("Start");
}
void loop() {
electricity = analogRead(0);
Serial.print(electricity);
Serial.print(",");
sweat = analogRead(1);
//int sweatiness = map( sweat, 700, 900, 300, 700 );
//Serial.print( sweatiness );
Serial.print(sweat);
Serial.print(",");
heat = analogRead(2);
Serial.print(heat);
Serial.print(",");
light = analogRead(3);
int brightness = light;
//int brightness = map( light, 750, 1000, 250, 750 );
analogWrite( led, brightness );
//Serial.print(light);
Serial.print(brightness);
Serial.print(",");
posture = analogRead(4);
Serial.print(posture);
Serial.print(",");
breath = analogRead(5);
Serial.print(breath);
Serial.print(",");
Serial.write(10);
delay( 1000 );
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: