#include <DS18B20.h>
#include <OneWire.h>
DS18B20 ds(2);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
float val = ds.getTempC();
float tempt = (val/15.69*125);
float vall = analogRead(A0);
float voltage = (vall/1023*5);
if((voltage >2.5 && voltage <4 ) || (tempt >90))
{digitalWrite(3, HIGH);}
else {digitalWrite(3, LOW);}
Serial.print(tempt);
Serial.println("C");
Serial.print(voltage);
Serial.println ("V");
delay(500);
}