proverò il tuo consiglio, nel fratempo ho modificato e :
/*fotoresistore*/
int light; // variabile da calcolare
int ledPinlux = 12; // pin led fotoresistenza
int photoresistor = 0; // pin analogico IN fotoresistore
/*end fotoresistore*/
void setup(){
Ethernet.begin(mac, ip, gateway, subnet);
pinMode(outPin, OUTPUT);
pinMode(ledPinlux, OUTPUT);
Serial.begin(9600);
}
void loop(){
float inTemp = analogRead(1); // pin analogico IN sensore temperatura
/*inizio calcolo temperatura*/
// prova con unico calcolo con sensor temp 36gz. Aggiunto condens.ceram. 0,5 uF come da datasheet
//celsius = inTemp * 0.4883 - 50;
//temp = celsius;
//prova http://tronixstuff.wordpress.com/2010/04/15/getting-started-with-arduino-chapter-two/
voltage = (inTemp*5000)/1024; // convert raw sensor value to millivolts
voltage = voltage-500; // remove voltage offset
celsius = voltage/10; // convert millivolts to Celsius
/*fine calcolo temperatura*/
risultato soddisfacente. intanto e saltato fuori il decimale adesso devo capire come mai non legge il dato
STATUS SENSORI
TEMPERATURA = 0.00 C
FREDDO
LUCE = 590
LUCE
AGGIORNA SENSORI: CHECK