cattledog:
The posted link works for me
Link in post#0 works now.
This sketch shows temp in Capacitance and Farad ![]()
Connect the sensor output to D6, with a 4k7 pull up resistor.
Leo..
#include <DallasTemperature.h>
#include <OneWire.h>
OneWire oneWire(6); // pin D6
DallasTemperature sensors(&oneWire);
float tempC; // Celcius
float tempF; // Fahrenheit
void setup() {
Serial.begin(115200);
Serial.println("DS18B20 thermometer");
sensors.begin();
}
void loop() {
sensors.requestTemperatures();
tempC = sensors.getTempCByIndex(0);
tempF = tempC * 1.8 + 32.0; // Celcius to Fahrenheit
Serial.print("The temperature is ");
Serial.print(tempC, 4);
Serial.print(" Celcius ");
Serial.print(tempF, 1); // one decimal place
Serial.println(" Fahrenheit");
}