// custom-chip. R added by me.
#include <OneWire.h>
#include <DallasTemperature.h>
OneWire oneWire(A0); //pin A0
DallasTemperature sensor(&oneWire);
void setup(void) { Serial.begin(9600); // delay(2);
sensor.begin(); // delay(20);
}
void loop(void) {
sensor.requestTemperatures();
Serial.print("Temperature is: ");
Serial.println(sensor.getTempCByIndex(0));
delay(1000);
}
Loading
ds18b20
ds18b20