Pages: [1]   Go Down
Author Topic: kty 10 linear  (Read 1507 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hy everyone!
I am trying to make a temperature sensor and linearise it,...
I hope You uderstand what I mean... I am not yet familiar with the whole terminologie smiley-sad but I am working on it smiley
I want to make a temperature sensor with kty 10 and arduino, wich will give me a reading in celsius on a 8x2 LCD display.
I want to do it, but I cant get the math.h library to work...
it wont turn red when I try to include it, and I have no way of knowing if I put in the equation coretly... using sqr, and rt functions is crutial if I want a linear masuremant, right?

any help from you good people would much apriciated smiley

vito (thats my name smiley)
« Last Edit: June 18, 2010, 01:34:15 am by ogvito » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

THIS IS WHAT I HAVE SO FAR, BUT IT IS NOWHERE NEAR CLOSE TO MY GOAL...


#include <LiquidCrystal.h>

double vrednost = 0;
int backLight = 13; //pin 13 nadzor osvetlitve zaslona (control of display backlight)
LiquidCrystal lcd(10,11,12,13,14,15,16);
int analogPin=4;
int analogValue = 0;
float napetost = 0; //napetost = voltage

void setup()
{
  Serial.begin(9600);
  pinMode(backLight, OUTPUT);
  digitalWrite(backLight,HIGH);
  lcd.begin(2,16);
  lcd.clear();
  
}

void loop()
{
  analogValue = analogRead(analogPin);
  napetost = analogValue * 1023 / 8 / 150; //napetost = VOLTAGE, and I need to put in the equation wich linearises the reading, but am not shure how to do it
  Serial.print(napetost); //napetost = voltage
  Serial.println("C");
  lcd.clear();
  lcd.setCursor(1,0);
  lcd.print(napetost);
    lcd.setCursor(1,1);
  lcd.print("stopinj C"); //STOPINJ = DEGREES CELSIUS
  
  delay(100);
  
}
« Last Edit: June 18, 2010, 01:34:29 am by ogvito » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to make a temperature sensor and linearise it,.
Logged

Pages: [1]   Go Up
Jump to: