1 / 17

Ubiquitous Computing Practice (Temperature)

Ubiquitous Computing Practice (Temperature). 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. Contents. Introduction TMP36 Temperature

rodd
Download Presentation

Ubiquitous Computing Practice (Temperature)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ubiquitous Computing Practice(Temperature) Youn-Hee Han, In-Seok Kang {yhhan, Iseka}@kut.ac.kr Laboratory of Intelligent NetworksAdvanced Technology Research CenterKorea University of Technology http://link.kut.ac.kr

  2. Contents • Introduction • TMP36 • Temperature • print out the temperature(centigrade) 섭씨 온도 출력 • Convert to Fahrenheight’s temperature • 화씨 온도 출력 • 도전과제

  3. Introduction

  4. 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. print out the temperature(centigrade) Temperature

  6. Temperature

  7. schematic

  8. 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. Sketch int temperaturePin = 0; void setup() { Serial.begin(9600); } void loop() { float temperature = getVoltage(temperaturePin); temperature = (temperature - 0.5) * 100; // Serial.println(temperature); delay(1000); } float getVoltage(int pin) { return (analogRead(pin) * .004882814); // 5 / 1024 //converting from a 0 to 1023 digital range // to 0 to 5 volts (each 1 reading equals ~ 5 millivolts) }

  10. Result

  11. convert to Fahrenheight’s

  12. convert to Fahrenheight’s

  13. Sketch intsensorPin = 0; void setup() { Serial.begin(9600); } void loop() { intreading = 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); }

  14. 조도와온도의 변화에 따라 LED 작동 도전과제

  15. 도전과제 내용 • 조도의 변화에 따라 LED가 점차 점등 • 온도의 변화에 따라 LED가 점차 점등

  16. Thank You

More Related