Question

I need help with creating a arduino code using a GSR sensor that measures when a person is sweati...

I need help with creating a arduino code using a GSR sensor that measures when a person is sweating or not.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

GSR sensor has 4 pins:

black- ground

red- 5v

yellow-A0

white-NC

arduino code:-

const int GSR=A0;  //gsr yellow(data) pin should be connected to A0
int sensorValue=0;
int gsr_avg=0;

void setup(){
  Serial.begin(9600);
}

void loop()
{
  long j=0;
  for(int i=0;i<10;i++)           //Average the 10 measurements to remove the glitch
      {
      sensorValue=analogRead(GSR);
      j = j + sensorValue;
      delay(5);
      }
   gsr_avg = j/10;
  // In case you need to know or check the gsr avg remove the comments for the below line
  // Serial.println(gsr_avg);
   
   if(gsr_avg > 500)
   Serial.println("Sweating");
   else
   Serial.println("Not sweating")
}
Add a comment
Know the answer?
Add Answer to:
I need help with creating a arduino code using a GSR sensor that measures when a person is sweati...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT