Home Thermometer

From NURDspace
Revision as of 09:28, 25 August 2014 by Zarya (talk | contribs) (Text replacement - "ProjectStatus" to "Status")
Home Thermometer
NoPicture.png
Participants User:buzz
Skills
Status Finished
Niche
Purpose
Tool No
Location
Cost
Tool category

Home Thermometer Property "Tool Image" (as page type) with input value "File:{{{Picture}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Picture}}} {{#if:No | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:No | [[Tool Cost::{{{Cost}}} | }}

Why

So, I received some electronic brick kit and no specific purpose for it.

What

I have now combined the thermistor+opamp board and the lcd board with an old arduino I still had around. This gets me a serial outputting thermometer with a lcd readout.

Sourcecode


#include <LiquidCrystal.h>

int sensorPin = A5;
int sensorValue = 0;

LiquidCrystal lcd(10,11,12,13, A0, A1, A2);

void setup()
{
  Serial.begin(57600);
  lcd.begin(16, 2); 
}

void loop()
{
  sensorValue=analogRead(sensorPin);
  float x = map(sensorValue,250,700,13,439);
  x /= 10.0;
  Serial.print(sensorValue);
  Serial.print(" ");
  Serial.println(x);
  lcd.setCursor(1,0);
  lcd.print ("T: ");
  lcd.print (x);
  lcd.print ("   ");
  lcd.setCursor(1,1);
  lcd.print ("X: ");
  lcd.print (sensorValue);
  lcd.print ("   ");
  
  
  delay(1000);
}