Building the circuit

We prototyped a GSR using an arduino and a breadboard. We then tested our code by making an LED light up in response to the sweat in our fingers. Our next step is soldering the aroma usb to the arduino and having scent be the output.

-Betty and Stephanie

photo

 

Screen Shot 2014-03-13 at 7.52.14 PM Screen Shot 2014-03-13 at 7.51.54 PM

Code:

This example code is in the public domain. We modified it to fit our needs

http://www.arduino.cc/en/Tutorial/Graph
*/

int led = 3;
void setup() {
// initialize the serial communication:
Serial.begin(9600);
pinMode(led, OUTPUT);
}

void loop() {
// send the value of analog input 0:
Serial.println(analogRead(A0));

if(analogRead(A0) > 30) {
digitalWrite(led, HIGH);}
else{
digitalWrite(led, LOW);
}
// wait a bit for the analog-to-digital converter
// to stabilize after the last reading:
delay(2);
}

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *