Devices & Components
RGB Backlight LCD - 16x2
Solderless Breadboard Full Size
Rotary Potentiometer - Linear (10k ohm)
Thermistor [Tempature Sensor]
Jumper wires (generic)
Resistor 10k ohm
ELEGOO UNO R3 Board ATmega328P ATMEGA16U2 with USB Cable
Software & Tools
Arduino Web Editor
Arduino IDE
Project description
Code
Arduino IDE
arduino
You just can copy & paste it later!
1//www.elegoo.com 2//2016.12.9 3 4#include <LiquidCrystal.h> 5int tempPin = 0; 6// BS E D4 D5 D6 D7 7LiquidCrystal lcd(7, 8, 9, 10, 11, 12); 8void setup() 9{ 10 lcd.begin(16, 2); 11} 12void loop() 13{ 14 int tempReading = analogRead(tempPin); 15 // This is OK 16 double tempK = log(10000.0 * ((1024.0 / tempReading - 1))); 17 tempK = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * tempK * tempK )) * tempK ); // Temp Kelvin 18 float tempC = tempK - 273.15; // Convert Kelvin to Celcius 19 float tempF = (tempC * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit 20 /* replaced 21 float tempVolts = tempReading * 5.0 / 1024.0; 22 float tempC = (tempVolts - 0.5) * 10.0; 23 float tempF = tempC * 9.0 / 5.0 + 32.0; 24 */ 25 // Display Temperature in C 26 lcd.setCursor(0, 0); 27 lcd.print("Temp C "); 28 // Display Temperature in F 29 //lcd.print("Temp F "); 30 lcd.setCursor(6, 0); 31 // Display Temperature in C 32 lcd.print(tempC); 33 // Display Temperature in F 34 //lcd.print(tempF); 35 delay(500); 36}
Arduino IDE
arduino
You just can copy & paste it later!
1//www.elegoo.com 2//2016.12.9 3 4#include <LiquidCrystal.h> 5int 6 tempPin = 0; 7// BS E D4 D5 D6 D7 8LiquidCrystal lcd(7, 8, 9 9, 10, 11, 12); 10void setup() 11{ 12 lcd.begin(16, 2); 13} 14void loop() 15{ 16 17 int tempReading = analogRead(tempPin); 18 // This is OK 19 double tempK = 20 log(10000.0 * ((1024.0 / tempReading - 1))); 21 tempK = 1 / (0.001129148 + (0.000234125 22 + (0.0000000876741 * tempK * tempK )) * tempK ); // Temp Kelvin 23 float 24 tempC = tempK - 273.15; // Convert Kelvin to Celcius 25 float tempF 26 = (tempC * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit 27 /* replaced 28 29 float tempVolts = tempReading * 5.0 / 1024.0; 30 float tempC = (tempVolts 31 - 0.5) * 10.0; 32 float tempF = tempC * 9.0 / 5.0 + 32.0; 33 */ 34 // Display 35 Temperature in C 36 lcd.setCursor(0, 0); 37 lcd.print("Temp C "); 38 39 // Display Temperature in F 40 //lcd.print("Temp F "); 41 lcd.setCursor(6, 42 0); 43 // Display Temperature in C 44 lcd.print(tempC); 45 // Display Temperature 46 in F 47 //lcd.print(tempF); 48 delay(500); 49}
Downloadable files
This is the Wiring Diagram [It show how to connect the wires]
By just looking at it you can build the whole circuit!
This is the Wiring Diagram [It show how to connect the wires]
This is the Wiring Diagram [It show how to connect the wires]
By just looking at it you can build the whole circuit!
This is the Wiring Diagram [It show how to connect the wires]
Documentation
Here is an image of the project!
Here is an image of the project!

Comments
Only logged in users can leave comments