DS18B20 read-out multiple sensors - [SOLVED]


I´m new to Arduino. I have an Arduino Uno R3 from Elegoo.

I have 3 DS18B20 sensors. One sensor gets read, the others not. No matter how I change them over, the reading is always only from one sensor. All three sensors work individually. My sensors are connected to a tiny circuit board with an inbuilt pull-up resistor.

The pins are connected on a breadboard, all vcc in one line, all ground in one line, and all 00 in one line. Only one of the three is detected, when more than one are connnected.

Where is my mistake?
Thanks in advance, nicolleen

This is the sketch I use, I have downloaded it, I get no error message when uploading it to the Arduino:

#include <OneWire.h> // http://www.arduino.cc/playground/Learning/OneWire
#include <DallasTemperature.h> // http://milesburton.com/index.php?title=Dallas_Temperature_Control_Library

#define ONE_WIRE_BUS 2

OneWire oneWire(ONE_WIRE_BUS); // Einrichten des OneWire Bus um die Daten der Temperaturfühler abzurufen
DallasTemperature sensors(&oneWire); // Bindung der Sensoren an den OneWire Bus

DeviceAddress tempDeviceAddress; // Verzeichniss zum Speichern von Sensor Adressen
int numberOfDevices; // Anzahl der gefundenen Sensoren

void setup(void)
Serial.println(“Abfrage mehrerer Dallas Temperatur Sensoren”);

// Suche der Sensoren
Serial.println(“Suche Temperatur Sensoren…”);
numberOfDevices = sensors.getDeviceCount();

Serial.print(“Habe “);
Serial.print(numberOfDevices, DEC);
Serial.println(” Sensoren gefunden.”);

// Setzen der Genauigkeit
for(int i=0 ;i<numberOfDevices; i++) {
if(sensors.getAddress(tempDeviceAddress, i)) {
sensors.setResolution(tempDeviceAddress, TEMPERATURE_PRECISION);
Serial.print(“Sensor “);
Serial.print(” hat eine genauigkeit von “);
Serial.println(sensors.getResolution(tempDeviceAddress), DEC);


void loop(void)
// Aufruf der Funktion sensors.requestTemperatures()
// Dadurch werden alle werte abgefragt.
Serial.print("Abfrage der Temperatur… ");

// Ausgabe der Daten für jeden Sensor
for(int i=0 ;i<numberOfDevices; i++) {
float tempC = sensors.getTempCByIndex(i);
Serial.print("Sensor “);
Serial.print(i, DEC);
Serial.print(” hat grad Celsius: ");

All right, I have found the problem. I guess it was a typical beginner´s mistake, after I tried just about everything.

All I need to do each time I connect another sensor, was to shut down the software and unplug the Arduino and then start everything up again. I got all three sensors now.

Sorry to have bothered you!

lg nicolleen