Serial print("Temperature1: "); Serial



Download 44,77 Kb.
Sana06.03.2022
Hajmi44,77 Kb.
#483893
Bog'liq
Tempratura sensor


/**
Basic NTC Thermistor demo
https://wokwi.com/arduino/projects/299330254810382858

Assumes a 10K@25℃ NTC thermistor connected in series with a 10K resistor.


Copyright (C) 2021, Uri Shaked


*/
#include

LiquidCrystal lcd(12, 11, 4, 5, 6, 7);


const float BETA = 3950; // should match the Beta Coefficient of the thermistor


void setup() {


Serial.begin(9600);
lcd.begin(16,2);
}

void loop() {


int analogValue1 = analogRead(A0);
int analogValue2 = analogRead(A1);
int analogValue3 = analogRead(A2);
int analogValue4 = analogRead(A3);
float celsius1 = 1 / (log(1 / (1023. / analogValue1 - 1)) / BETA + 1.0 / 298.15) - 273.15;
float celsius2 = 1 / (log(1 / (1023. / analogValue2 - 1)) / BETA + 1.0 / 298.15) - 273.15;
float celsius3 = 1 / (log(1 / (1023. / analogValue3 - 1)) / BETA + 1.0 / 298.15) - 273.15;
float celsius4 = 1 / (log(1 / (1023. / analogValue4 - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd.clear();
lcd.print("T1=");
lcd.print(celsius1);
lcd.setCursor(7, 0);
lcd.println("C");
lcd.setCursor(9, 0);
lcd.print("T2=");
lcd.print(celsius2);
lcd.println("C");
lcd.setCursor(0, 1);
lcd.print("T3=");
lcd.print(celsius2);
lcd.setCursor(7, 1);
lcd.println("C");
lcd.setCursor(9, 1);
lcd.print("T4=");
lcd.print(celsius3);
lcd.println("C");
delay(200);
Serial.print("Temperature1: ");
Serial.print(celsius1);
Serial.println(" ℃");
Serial.print("Temperature2: ");
Serial.print(celsius2);
Serial.println(" ℃");
Serial.print("Temperature3: ");
Serial.print(celsius3);
Serial.println(" ℃");
Serial.print("Temperature4: ");
Serial.print(celsius4);
Serial.println(" ℃");
delay(1000);
}

Download 44,77 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish