top of page
Search
Writer's pictureMein-bhi-Engineer

TEMPERATURE SENSOR

Updated: Aug 6, 2022

Temperature Sensors measure the amount of heat energy or even coldness that is generated by an object or system, allowing us to “sense” or detect any physical change to that temperature producing either an analogue or digital output.


CIRCUIT DIAGRAM


CODE



#include<LiquidCrystal.h>

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

float cel=0;
float fah=0;
void setup()
{
  lcd.begin(16, 2);
}

void loop()
{
  cel = -40 + 0.488155 * (analogRead(A3) - 20);
  fah = -40 + 0.878679 * (analogRead(A3) - 20);
  lcd.setCursor(0,0);
  lcd.print("Temp C");
  lcd.setCursor(10,0);
  lcd.print("Temp F");
  lcd.setCursor(1,1);
  lcd.print(cel);
  lcd.setCursor(11,1);
  lcd.print(fah);
}

15 views0 comments

Recent Posts

See All

Commentaires


bottom of page