I'm attempting to construct a plant watering and monitoring system using an arduino. I'm using an existing layout and program.
The output to the LCD display from the 10k Thermistor is as follows:
Temp output
61°F = 901
90°F = 949
51°F = 877
32°F = 796
I've been trying to write some lines to convert the output to read degrees farenheit. Any help would be appreciated.
CODE:
int moistureSensor = 0;
int lightSensor = 1;
int tempSensor = 2;
int moisture_val;
int light_val;
int temp_val;
void setup() {
Serial.begin(9600); //open serial port
}
void loop() {
moisture_val = analogRead(moistureSensor); // read the value from the moisture-sensing probes
Serial.print("moisture sensor reads ");
Serial.println( moisture_val );
delay(500);
light_val = analogRead(lightSensor); // read the value from the photosensor
Serial.print("light sensor reads ");
Serial.println( light_val );
delay(500);
temp_val = analogRead(tempSensor); // read the value from the thermistor
Serial.print("temp sensor reads ");
Serial.println( temp_val );
delay(1000);
}
TNX Buzz239