Difference between revisions of "LilyPad Temperature Sensor"

From Geeetech Wiki
Jump to: navigation, search
Line 22: Line 22:
  
 
A0 -------- S
 
A0 -------- S
 +
 +
  
 
2.Upload the code
 
2.Upload the code
Line 47: Line 49:
  
 
};
 
};
 +
 +
  
 
3.Open the monitor
 
3.Open the monitor
 +
 +
 +
[[File:20130916170043.png]]

Revision as of 09:01, 30 August 2013

Overview

08777-04.jpg 08777-03.jpg


Detecting temperature changes has never been easier. The MCP9700 is a small thermistor type temperature sensor. This sensor will output 0.5V at 0 degrees C,

0.75V at 25 C, and 10mV per degree C. Doing an analog to digital conversion on the signal line will allow you to establish the local ambient temperature.

Detect physical touch based on body heat and ambient conditions with this small sensor.


USE

1.Connect Uno and LilyPad Temperature Sensor like as:

Uno ------ LilyPad Temperature Sensor

5V -------- +

GND ------- -

A0 -------- S


2.Upload the code

float temp;

void setup() {

Serial.begin(57600);

};


void loop () {

temp = analogRead(0)*5/1024.0;

temp = temp - 0.5;

temp = temp / 0.01;

Serial.println(temp);

delay(500);

};


3.Open the monitor


20130916170043.png