// DS18B20 temperature sensor setup
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature DS18B20(&oneWire);
Any help or thoughts much appreciated.
Best regards
dataguy
//setup stuff
DS18B20.begin();
DS18B20.setResolution(10);// 0.25 degrees
DS18B20.setWaitForConversion(false);
DS18B20.requestTemperatures();
void gettemp(){
otmp = DS18B20.getTempCByIndex(0);
itmp = DS18B20.getTempCByIndex(1);
dtostrf(otmp,5,1,tmpo);
dtostrf(itmp,5,1,tmpi);
sprintf(str1,"Temperatures: in %sC, out %sC \n",tmpi,tmpo);
sprintf(dstr3,"In%sC Out%sC",tmpi,tmpo);
Serial.print("Temp #1 ");
Serial.print(otmp);
Serial.print("C, Temp #2 ");
Serial.print(itmp);
Serial.println("C");
DS18B20.requestTemperatures(); // for next time round
}
Result is :-
IP address: 192.168.1.13
Temp #1 81.00C, Temp #2 76.75C
HTTP server started
Temp #1 81.00C, Temp #2 76.75C
Any help or ideas much appreciated.
Best Regards
Dataguy