Grant
Published © GPL3+

Temperature sensor

Arduino learned how to tell the temperature

BeginnerFull instructions provided26,344
Temperature sensor

Things used in this project

Story

Read more

Schematics

temp set up

temp wiring

temp schematic

Code

temp

Arduino
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

const int tmp = A0;
const int p = 8;

void setup() {
  lcd.begin(16, 2);
  Serial.begin(9600);
  pinMode(p, OUTPUT);
  // put your setup code here, to run once:

}

void loop() {
  digitalWrite(p,LOW);
  int Temp = analogRead(tmp);
  float volts = (Temp / 965.0) * 5;
  float c = (volts - .5) * 100;
  float f = (c * 9 / 5 + 32);
  Serial.println(f);
  lcd.setCursor(5, 0);
  lcd.print(f);
  delay(3000);
  // put your main code here, to run repeatedly:

}

Credits

Grant

Grant

12 projects • 46 followers
Student; DIY technology hobbyist

Comments