void setup() {
// put your setup code here, to run once:
pinMode(A0,INPUT);
pinMode(4,OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int x;
float y;
x= analogRead(A0);
y=(x*4.88/(10-50));
Serial.println("the temperature is");
Serial.println(y);
//Resistance is read by DO(pin4)
//More LUX 78000 less resitance 9
// More value at x 593 it is dark less LUX 63
if (y>25 &&y<40)
digitalWrite(5,HIGH);
else
digitalWrite(5,LOW);
}