Download presentation
Presentation is loading. Please wait.
Published byLindsay Hubbard Modified over 9 years ago
1
Youn-Hee Han, In-Seok Kang {yhhan, Iseka}@kut.ac.kr Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology http://link.kut.ac.kr Ubiquitous Computing Practice (Temperature)
2
/ 17 Introduction TMP36 Temperature print out the temperature(centigrade) 섭씨 온도 출력 Convert to Fahrenheight’s temperature 화씨 온도 출력 도전과제 2 Contents
3
/ 173 Introduction
4
/ 174 TMP36 Feature : - Voltage Input: 2.7 V to 5.5 VDC - 10 mV/°C scale factor - ±2°C accuracy over temperature - ±0.5°C linearity - Operating Range: −40°C to +125°C
5
/ 175
6
TEMPERATURE print out the temperature(centigrade) 6
7
/ 177 Temperature
8
/ 178 schematic
9
/ 17 If you're using a 5V Arduino Voltage at pin in milliVolts = (reading from ADC) * (5000/1024) This formula converts the number 0-1023 from the ADC into 0-5000mV (= 5V) If you're using a 3.3V Arduino Voltage at pin in milliVolts = (reading from ADC) * (3300/1024) This formula converts the number 0-1023 from the ADC into 0-3300mV (= 3.3V) Centigrade temperature = [(analog voltage in mV) - 500] / 10 9
10
/ 1710 Sketch
11
/ 1711 Result
12
/ 17 CONVERT TO FAHRENHEIGHT’S 12
13
/ 1713 convert to Fahrenheight’s
14
/ 1714 Sketch int sensorPin = 0; void setup() { Serial.begin(9600); } void loop() { int reading = analogRead(sensorPin); float voltage = reading * 5.0; voltage /= 1024.0; Serial.print(voltage); Serial.println(" volts"); float temperatureC = (voltage - 0.5) * 100 ; Serial.print(temperatureC); Serial.println(" degrees C"); // now convert to Fahrenheight float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; Serial.print(temperatureF); Serial.println(" degrees F"); delay(1000); }
15
/ 17 도전과제 조도와 온도의 변화에 따라 LED 작동 15
16
/ 1716 도전과제 내용 조도의 변화에 따라 LED 가 점차 점등 온도의 변화에 따라 LED 가 점차 점등
17
/ 1717 Thank You
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.