how to get Celsius as output from LM335Z with arduino?
Posted
by
wizztjh
on Stack Overflow
See other posts from Stack Overflow
or by wizztjh
Published on 2011-01-01T14:04:49Z
Indexed on
2011/01/02
1:54 UTC
Read the original article
Hit count: 595
microcontroller
|arduino
the firstsensor is my lm335z output.
int firstSensor = 0;
int secondSensor = 0;
int thirdSensor = 0;
int inByte = 0;
void setup()
{
Serial.begin(9600);
establishContact(); // send a byte to establish contact until receiver responds
}
void loop()
{
if (Serial.available() > 0) {
inByte = Serial.read();
firstSensor = analogRead(0);
delay(10);
secondSensor = analogRead(1);
thirdSensor = analogRead(2);
Serial.print(firstSensor, DEC);
Serial.print(",");
Serial.print(secondSensor, DEC);
Serial.print(",");
Serial.println(thirdSensor, DEC);
}
}
void establishContact() {
}
© Stack Overflow or respective owner