// No initial gpio declaration
// gpio for OneWire bus will be set during setup
#include <OneWire.h>
#include <DallasTemperature.h>
int Nbr_DS18B20 = 0;
OneWire ds; // OneWire ds(4);
DallasTemperature sensors(&ds);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
ds.begin(4);
sensors.begin();
Nbr_DS18B20 = sensors.getDeviceCount();
Serial.println(Nbr_DS18B20);
sensors.requestTemperatures(); // blocking ?
Serial.println(sensors.getTempCByIndex(0));
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}