Devices & Components
Arduino Uno Rev3
Jumper wires (generic)
Rotary potentiometer (generic)
thermistor
Resistor 10k ohm
Breadboard (generic)
resistor (yellow, blue, red)
Hardware & Tools
scissor
Software & Tools
Arduino IDE
Arduino Web Editor
Project description
Code
untitled
c_cpp
1#include <LiquidCrystal.h> 2 3int ThermistorPin = 0; 4int Vo; 5float R1 = 10000; 6float logR2, R2, T; 7float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07; 8 9LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 10 11void setup() { 12Serial.begin(9600); 13 14} 15 16void loop() { 17lcd.print("Alexander's"); 18delay(2000); 19lcd.clear(); 20lcd.print("Average air temp."); 21delay(2000); 22lcd.clear(); 23//_________________________ 24 Vo = analogRead(ThermistorPin); 25 R2 = R1 * (1023.0 / (float)Vo - 1.0); 26 logR2 = log(R2); 27 T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2)); 28 T = T - 273.15; 29 T = (T * 9.0)/ 5.0 + 32.0; 30 31 lcd.print("Temp = "); 32 lcd.print(T); 33 lcd.print(" F"); 34 35 delay(4000); 36 lcd.clear(); 37} 38
untitled
c_cpp
1#include <LiquidCrystal.h> 2 3int ThermistorPin = 0; 4int Vo; 5float R1 = 10000; 6float logR2, R2, T; 7float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07; 8 9LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 10 11void setup() { 12Serial.begin(9600); 13 14} 15 16void loop() { 17lcd.print("Alexander's"); 18delay(2000); 19lcd.clear(); 20lcd.print("Average air temp."); 21delay(2000); 22lcd.clear(); 23//_________________________ 24 Vo = analogRead(ThermistorPin); 25 R2 = R1 * (1023.0 / (float)Vo - 1.0); 26 logR2 = log(R2); 27 T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2)); 28 T = T - 273.15; 29 T = (T * 9.0)/ 5.0 + 32.0; 30 31 lcd.print("Temp = "); 32 lcd.print(T); 33 lcd.print(" F"); 34 35 delay(4000); 36 lcd.clear(); 37} 38
untitled
c_cpp
1#include <LiquidCrystal.h> 2 3int ThermistorPin = 0; 4int Vo; 5float 6 R1 = 10000; 7float logR2, R2, T; 8float c1 = 1.009249522e-03, c2 = 2.378405444e-04, 9 c3 = 2.019202697e-07; 10 11LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 12 13void 14 setup() { 15Serial.begin(9600); 16 17} 18 19void loop() { 20lcd.print("Alexander's"); 21delay(2000); 22lcd.clear(); 23lcd.print("Average 24 air temp."); 25delay(2000); 26lcd.clear(); 27//_________________________ 28 29 Vo = analogRead(ThermistorPin); 30 R2 = R1 * (1023.0 / (float)Vo - 1.0); 31 32 logR2 = log(R2); 33 T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2)); 34 35 T = T - 273.15; 36 T = (T * 9.0)/ 5.0 + 32.0; 37 38 lcd.print("Temp = "); 39 40 lcd.print(T); 41 lcd.print(" F"); 42 43 delay(4000); 44 45 lcd.clear(); 46} 47
Downloadable files
thermistor
thermistor

thermistor
thermistor

screen
screen

Comments
Only logged in users can leave comments