#include <LiquidCrystal.h>/* The circuit: * LCD RS pin to digital pin 7 * LCD E pin to digital pin 6 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground*/LiquidCrystal lcd(7,6,5,4,3,2); // set up the LCD's connection pinsvoid setup(){ lcd.begin(16, 2); // set up the LCD's number of columns and rows: lcd.print("hello, world!");}void loop() {}
#include <math.h>double Thermistor(int RawADC) { double Cal; Cal = log(10000.0/((1024.0/RawADC-1))); Cal = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Cal * Cal ))* Cal ); Cal = Cal - 273.15; // Convert Kelvin to Celcius return Cal;}void setup() { Serial.begin(9600);}void loop() { int Temp=Thermistor(analogRead(A3)); Serial.println(Temp); delay(1000);}