One wire DS18B20 reading +85°C, then -127°C and Arduino hanging up completely

Dear xfpd,

thank you so much for your hints! Your very short code (from "Arduino.cc's reference to Mathias Hanson (Matmunk) DS18B20 library") is working perfectly.

Then, I started to modify the orig. code from "zbylan" with the knowledge what you provide now ("Notice how the DS18B20 is initialized" ; " DallasTemperature.h is the preferred library"), so, I end up in the following code (I show only the first, modified lines now):

// #include <OneWire.h>
#include <DallasTemperature.h>
#include <DS18B20.h>

// pin declaration for individual instances/lines
// deklaracja pin dla poszczególnych instancji/linii

DS18B20 ds(2);
DS18B20 ds(11);
DS18B20 ds(12);

Now, it complains "error: redefinition of 'DS18B20 ds' ", which I also understand. But how to solve this? My problem is, that it seems, I am too weak in programming that I can solve this by myself. I would understand, if the variable "DS18B20" is occuring on somewhere at another place in the code, then I would have renamed, e.g. "DS18B20_A ds(2); DS18B20_B ds(11); DS18B20_C ds(12);" and later in the code I could say "DS18B20_A = ...", BUT: The string "DS18B20" does not appear anywhere again.
So I tried the following:

// #include <OneWire.h>
#include <DallasTemperature.h>
#include <DS18B20.h>

// pin declaration for individual instances/lines
// deklaracja pin dla poszczególnych instancji/linii

DS18B20_A ds(2);
DS18B20_B ds(11);
DS18B20_C ds(12);

// here necessarily put the addresses of your DS18B20 sensors
// tu koniecznie wstaw adresy swoich sensorów DS18B20
byte adrRoom[8] = {0x28, 0xBE, 0x0, 0x7, 0xD6, 0x1, 0x3C, 0x9D};
byte adrPool[8] = {0x28, 0xBA, 0xCC, 0x7, 0xD6, 0x1, 0x3C, 0x42};
byte adrBath[8] = {0x28, 0x96, 0xF, 0x96, 0xF0, 0x1, 0x3C, 0xCE};

float tempRoom;
float tempPool;
float tempBath;

void setup() {
  while (!Serial);
  Serial.begin(9600);

  DS18B20_A.reset_search();
  DS18B20_B.reset_search();
  DS18B20_C.reset_search();
  
  // sensor resolution declarations may be different for each line
  // deklaracje rozdzielczości sensorów mogą być różne dla poszczególnych linii
  DS18B20_A.begin(12);
  DS18B20_B.begin(12);
  DS18B20_C.begin(12);
}

void loop() {
  if (DS18B20_A.available() ) {
    tempPool = Line1.readTemperature(adrPool);
    tempBath = Line1.readTemperature(adrBath);
    Line1.request();
  }
  if (DS18B20_B.available()) {
    tempRoom = Line2.readTemperature(adrRoom);
    Line2.request();
  }
  if (DS18B20_C.available()) {
    // here read the temperature from the sensors on line 3
    // tu odczytaj temperaturę z czujników na linii 3
    Line3.request();
  }

  Serial.println(" ===============================================================");
  Serial.print("   tempBath: ");
  Serial.print(tempBath);
  Serial.print("   tempRoom: ");
  Serial.print(tempRoom);
  Serial.print("   tempPool: ");
  Serial.println(tempPool);
  delay(500); // needed only for friendly observation of the serial monitor
                     // DS18B20 is read asynchronously (not dependent on loop circulation time)
}

Now, it complains "error: 'DS18B20_A' does not name a type; did you mean 'DS18B20_H'?
"

=> So, maybe, it sounds stupid for you and/or for others reading this, but I do not know how to proceed. => Many thanks in advance for a hint!


Dear "theeccentricgenius",
thanks for clarifying, I will do so!

bye
bernd2700

Change this to

DS18B20 dsA(2);
DS18B20 dsB(11);
DS18B20 dsC(12);

Change to

  dsA.reset_search();
  dsB.reset_search();
  dsC.reset_search();
  
  // sensor resolution declarations may be different for each line
  // deklaracje rozdzielczości sensorów mogą być różne dla poszczególnych linii
  dsA.begin(12);
  dsB.begin(12);
  dsC.begin(12);

Do that in the rest of the code DS18B20_A must changed by dsA, DS18B20_B by dsB ......

1 Like

I have re-opened the previous topic as requested, and merged the continuation topic.

Carry on.

1 Like

Thank you "pert" for re-opening!
I hope, all guys can follow the new-old "link" again.

MANY thanks also to "buckfast_beekeeper" for your advice what to do in concrete. These kind of advices ( = change X into Y) is helping me further (instead of just saying "one could do this or that"). I changed, I think accordingly as you meant, but unfortunately the code is not working.
My code now looks like:

// #include <OneWire.h>
#include <DallasTemperature.h>
#include <DS18B20.h>

// pin declaration for individual instances/lines
// deklaracja pin dla poszczególnych instancji/linii

DS18B20 ds_A(2);
DS18B20 ds_B(11);
DS18B20 ds_C(12);

// here necessarily put the addresses of your DS18B20 sensors
// tu koniecznie wstaw adresy swoich sensorów DS18B20
byte adrRoom[8] = {0x28, 0xBE, 0x0, 0x7, 0xD6, 0x1, 0x3C, 0x9D};
byte adrPool[8] = {0x28, 0xBA, 0xCC, 0x7, 0xD6, 0x1, 0x3C, 0x42};
byte adrBath[8] = {0x28, 0x96, 0xF, 0x96, 0xF0, 0x1, 0x3C, 0xCE};

float tempRoom;
float tempPool;
float tempBath;

void setup() {
  while (!Serial);
  Serial.begin(9600);

  ds_A.reset_search();
  ds_B.reset_search();
  ds_C.reset_search();
  
  // sensor resolution declarations may be different for each line
  // deklaracje rozdzielczości sensorów mogą być różne dla poszczególnych linii
  ds_A.begin(12);
  ds_B.begin(12);
  ds_C.begin(12);
}

void loop() {
  if (ds_A.available() ) {
    tempPool = ds_A.readTemperature(adrPool);
    tempBath = ds_A.readTemperature(adrBath);
    ds_A.request();
  }
  if (ds_B.available()) {
    tempRoom = ds_B.readTemperature(adrRoom);
    ds_B.request();
  }
  if (ds_C.available()) {
    // here read the temperature from the sensors on line 3
    // tu odczytaj temperaturę z czujników na linii 3
    ds_C.request();
  }

  Serial.println(" ===============================================================");
  Serial.print("   tempBath: ");
  Serial.print(tempBath);
  Serial.print("   tempRoom: ");
  Serial.print(tempRoom);
  Serial.print("   tempPool: ");
  Serial.println(tempPool);
  delay(500); // needed only for friendly observation of the serial monitor
                     // DS18B20 is read asynchronously (not dependent on loop circulation time)
}

Now it complains:
*) error: 'class DS18B20' has no member named 'reset_search'; did you mean 'resetSearch'?
*) error: 'class DS18B20' has no member named 'begin'
*) error: 'class DS18B20' has no member named 'readTemperature'

And yes, indeed, as I said, the very short code from "xfpd" from "Arduino.cc's reference to Mathias Hanson (Matmunk) DS18B20 library" is working, and there I see for instance "ds.getTempC()". Ok, I could replace that easily, but what to do with the rest? What to write instead of the ".begin" and ".search" ??
I hope, you guys have any ideas?

Thanks in advance,
bernd2700

The DallasTemperature folder on github has examples that will show how they write sketches, which should answer some of your questions. If you have more, please ask.

Would you post the code that works and the code that you want to work, but has errors?

I'm betting the
#include <DS18B20.h>
Is redundant and possibly crucifying your code.

Dear all,

Thank you for your inputs!

The code, what is working, is e.g.:

#include <DS18B20.h>

DS18B20 ds(2);

void setup() {
  Serial.begin(9600);
}

void loop() {
  while (ds.selectNext()) {
    Serial.println(ds.getTempC());
  }
}

The code I would like to get to work is the following: (because Zbylan obviously solved the problem in dividing the 1-wire network up into more hardware pins and uses fixed addresses, which I like):
And I have absolutely no idea, why in my case this is not working, because I included the same libraries (so did a 1:1 copy of the code; of course I would need to change address, but the errors start much before doing this step already)

/*
    Many DS18B20 sensors on 3 lines 1-Wire connected to pins: 2, 11, 12.
    What is obvious, you need to change the unique addresses of the DS18B20 
    sensors, in any (and obvious) way you can change the number of 1-Wire 
    lines and the pins to support them (as many pins as lines), as well as 
    the pin numbers and the number of sensors on each line. 
    by zbylan@vp.pl , january 2023
*/

#include <OneWire.h>
#include <DS18B20.h>

// pin declaration for individual instances/lines
// deklaracja pin dla poszczególnych instancji/linii
OneWire onewire1(2);
OneWire onewire2(11);
OneWire onewire3(12);

DS18B20 Line1(&onewire1);
DS18B20 Line2(&onewire2);
DS18B20 Line3(&onewire3);

// here necessarily put the addresses of your DS18B20 sensors
// tu koniecznie wstaw adresy swoich sensorów DS18B20
byte adrRoom[8] = {0x28, 0xBE, 0x0, 0x7, 0xD6, 0x1, 0x3C, 0x9D};
byte adrPool[8] = {0x28, 0xBA, 0xCC, 0x7, 0xD6, 0x1, 0x3C, 0x42};
byte adrBath[8] = {0x28, 0x96, 0xF, 0x96, 0xF0, 0x1, 0x3C, 0xCE};

float tempRoom;
float tempPool;
float tempBath;

void setup() {
  while (!Serial);
  Serial.begin(9600);

  onewire1.reset_search();
  onewire2.reset_search();
  onewire3.reset_search();
  
  // sensor resolution declarations may be different for each line
  // deklaracje rozdzielczości sensorów mogą być różne dla poszczególnych linii
  Line1.begin(12);
  Line2.begin(12);
  Line3.begin(12);
}

void loop() {
  if (Line1.available() ) {
    tempPool = Line1.readTemperature(adrPool);
    tempBath = Line1.readTemperature(adrBath);
    Line1.request();
  }
  if (Line2.available()) {
    tempRoom = Line2.readTemperature(adrRoom);
    Line2.request();
  }
  if (Line3.available()) {
    // here read the temperature from the sensors on line 3
    // tu odczytaj temperaturę z czujników na linii 3
    Line3.request();
  }

  Serial.println(" ===============================================================");
  Serial.print("   tempBath: ");
  Serial.print(tempBath);
  Serial.print("   tempRoom: ");
  Serial.print(tempRoom);
  Serial.print("   tempPool: ");
  Serial.println(tempPool);
  delay(500); // needed only for friendly observation of the serial monitor
                     // DS18B20 is read asynchronously (not dependent on loop circulation time)
}

Now, I would like to do a decent, good work with a running code which "never" crashes. But for doing so I need your help: As Nick_Pyner now said: "I'm betting the #include <DS18B20.h> Is redundant and possibly crucifying your code."

==> Can you guys help me to FIRST come to a consent, which libraries to use, and which not to use, to get at the end a decent, stable, running environment. When that is clear, NEXT I will search for the commands appropriate to use for that used library/-ies.
E.g. I observe: "Zbylan" uses "#include <OneWire.h> and "#include <DS18B20.h>" and says THIS is the solution after many years, so I want to use that code basically. But in my case it does not work. Also Nick_Pyner says, additionally using "#include <DS18B20.h>" is not a good option for me. And on the other hand "xfpd" writes " For your DS18B20, it seems (!) DallasTemperature.h is the preferred library". And "buckfast_beekeeper" wrote on Oct. 22 previously: "The dallas temperature library blocks the program.", which I do not want, because I have 7 sensors, and OLED display and I2C etc, and in particular some switches from which I want to read the states every second at least (so if I have pressed a switch, that at least it e.g. increments a value every second) So, you see, I am confused, and I would like to clarify this with your help,

My hardware temperature sensors are partly:
*) AZDelivery 10 x DS18B20 Digitaler Temperatursensor TO92-55°C - +125°C kompatibel mit Arduino und Raspberry Pi
*) AZDelivery 10 x 3M Kabel DS18B20 digitaler Edelstahl Temperatursensor Temperaturfühler, wasserdicht kompatibel mit Arduino und Raspberry Pi

Thank you so much in advance,
bernd2700

It looks like the code you have is for a different version of the libraries that I've used - The Miles Burton stuff.

The one I use lets you grab temperatures by address, but the asynchronous method has to be managed by you - I just tell the bus to read all sensors and make sure 750 milliseconds have elapsed before use. You could do the same and invoke the read on all three busses one after another, using a single time to tell you when they should all be done.

That way you can read other switches etc while you wait.

It looks like the code you have uses a library that has had some of that timing handled for you. Either find out which one it was, or you can do it as I described with some changes to the code you borrowed.

Not much use to you as it's half complete but this compiles at least:

/*
    Many DS18B20 sensors on 3 lines 1-Wire connected to pins: 2, 11, 12.
    What is obvious, you need to change the unique addresses of the DS18B20
    sensors, in any (and obvious) way you can change the number of 1-Wire
    lines and the pins to support them (as many pins as lines), as well as
    the pin numbers and the number of sensors on each line.
    by zbylan@vp.pl , january 2023
*/

#include <OneWire.h>
#include <DallasTemperature.h>

// pin declaration for individual instances/lines
// deklaracja pin dla poszczególnych instancji/linii
OneWire onewire1(2);
OneWire onewire2(11);
OneWire onewire3(12);

DallasTemperature Line1(&onewire1);
DallasTemperature Line2(&onewire2);
DallasTemperature Line3(&onewire3);

// here necessarily put the addresses of your DS18B20 sensors
// tu koniecznie wstaw adresy swoich sensorów DS18B20
byte adrRoom[8] = {0x28, 0xBE, 0x0, 0x7, 0xD6, 0x1, 0x3C, 0x9D};
byte adrPool[8] = {0x28, 0xBA, 0xCC, 0x7, 0xD6, 0x1, 0x3C, 0x42};
byte adrBath[8] = {0x28, 0x96, 0xF, 0x96, 0xF0, 0x1, 0x3C, 0xCE};

float tempRoom;
float tempPool;
float tempBath;

void setup() {
  while (!Serial);
  Serial.begin(9600);

  onewire1.reset_search();
  onewire2.reset_search();
  onewire3.reset_search();

  // sensor resolution declarations may be different for each line
  // deklaracje rozdzielczości sensorów mogą być różne dla poszczególnych linii
  Line1.begin();
  Line2.begin();
  Line3.begin();
}

void loop() {
  //if (Line1.available() ) 
  {
    tempPool = Line1.getTempC(adrPool);
    tempBath = Line1.getTempC(adrBath);
    //Line1.request();
  }
  //if (Line2.available())
  {
    tempRoom = Line2.getTempC(adrRoom);
    //Line2.request();
  }
  //if (Line3.available()) 
  {
    // here read the temperature from the sensors on line 3
    // tu odczytaj temperaturę z czujników na linii 3
   // Line3.request();
  }

  Serial.println(" ===============================================================");
  Serial.print("   tempBath: ");
  Serial.print(tempBath);
  Serial.print("   tempRoom: ");
  Serial.print(tempRoom);
  Serial.print("   tempPool: ");
  Serial.println(tempPool);
  delay(500); // needed only for friendly observation of the serial monitor
  // DS18B20 is read asynchronously (not dependent on loop circulation time)
}

I don't think you have set the resolution and therefore have defaulted to 12 bit, which is quite OK but, as advised before, you then require a conversion time of 750ms, and you have only allowed 500.

If you double the delay time, it should solve some problems. The code as written, sans the junk library, may indeed compile but I bet it won't work.
I don't think a 500ms delay for reading three values is anything " friendly" anyway.
And the comment is misleading...

I only use the Wire library for all my DS18B20 pgms, How are your sensors physically arranged?

Perhaps you mean "OneWire". "Wire" is I2C and totally different than the One Wire protocol.

1 Like

Of course. I only missed it by one. :roll_eyes:
TNX for catching that blunder, watch this space for more. :grimacing:

1 Like

Are these addresses correct of do you have them copy from an example program?

You mix 2 different things. If you use the addresses, one pin is enough. If you use multiple pins and one DS18B20 par pin, you don't need the addresses.

Dear guys,

Let's start with the easy things first ( = answering your questions):
*) The addresses of the sensors you see, are just a copy from anywhere, I will exchange them accordingly, as soon as other things (libraries) are clarified. I don't want to bother you with this since I can do this nicely completely on my own.
*) I have (and want to use) fixed addresses on more (e.g. 3 in these examples) Arduino pins. At the end, I would like to use 7 temp. sensors alltogether with fixed addresses, 5 sensors on e.g. pin "2", and the other 2 sensors on e.g. pin "3" of the Arduino Nano.
*) I would like to use 12 bit resolution.
'-------------

Now the - for me - very complicated stuff: Choosing the right libraries (together with the right, crucial pieces of code) :

"buckfast_beekeeper" tested on Nov. 22 in his post #47 some timing behaviour. In my opinion, that the code is really realiably working, a mix of 3 things is in the game:

  1. The running speed of the loop (with this "millis")
  2. The used libraries which either block the rest of the running program or do not block it, because the sensors are read asynchronously (that is what I also would like to use!)
  3. Additional neccessary commands ("buckfast_beekeeper" uses e.g. "sensors.setWaitForConversion(false);").
    On the other hand, "zbylan" solved this problem (writing in his post #48) not using "WaitForConversion" but using "LineX.available". So maybe better to ask when the "Line" is available, then request the temperatures. But as said, the code is not compiling at my side. Why the hell not?? I include the same libaries as "zbylan"!

So as said, I do not want this time "just any working, compiling code" which is maybe failing in some corner cases again, I would like - only possible with the help of you, guys - a decent working reliable code!
==> So, what would be your code suggestion, which libraries to include, which special commands to include, to get:
*) my 7 sensors on 2 different GPIO lines
*) with 12 bit , and
*) fixed address read asynchronously reliably forever working?
*) loop execution time shall be fixed to 1s (because e.g. a liquid flow-meter calc. is based on that)

Many thanks in advance,
bernd2700

Use this pgm to find the address of each of your DS18B20s, give each a name, label it and record it's address. In your pgm, they will look something like these two.

const byte upper[8] = {0x28,0x14,0xCE,0x4D,0x05,0x00,0x00,0x51},
           lower[8] = {0x28,0xFF,0x4A,0x00,0x22,0x04,0x00,0xFC};

one_wire_address_finder.ino (1.1 KB)

Report back with your findings and which Arduino you are using.

Just use the Miles Burton library, which I believe you already have, and everybody else uses, then go here
thereby putting yourself out of all this misery.
If you use anything other than Miles Burton, you deserve all the grief you will surely get.
By all means use a millis window, but using delay as you are now will suffice for the moment - so long as it is long enough. One second is a nice round figure which covers all contingencies and, if you think you need anything more frequent, you are just kidding yourself. - and have the wrong sensors anyway.

I don't know why you need two lines. Using six sensors on one is quite common, and any problems you have encountered in this arena may well be down to wiring (about which you say nothing), and not necessarily fixed by adding a port.

12 bit resolution is the default mode - no code required.

NO additional code over the above is required. "wait for conversion" and anything to do with LineX is just misleading claptrap. No surprises about your code not compiling, and don't bother telling us what the compiler said.

I have used the Hacktronics code more or less verbatim, and have now had it running more or less continuously for twelve years without a problem. I claim no credit or great expertise for this. I am simply doing what more or less everybody else is doing - just

#include <DallasTemperature.h>

without bothering with
sensors.setResolutionxx
and no fartarsing about with LineX and conversions.
I submit this business is simpler than you think.

2 Likes

I used the Miles Burton library for several years without issue. I’d be using it today but for the fact that my current router doesn’t support WEP, so I upgraded to a Pi to keep WiFi capability.

Dear "JCA34F",

Thanks for your answer, however, I said, I will later include the correct addresses, once this is clarified with the libraries, and the code compiles. I use Arduiono Nano.

Dear "Nick_Pyner",

ONE MILLION THANKS FOR YOUR CONCRETE STATEMENTS: "Use the Miles Burton, because everybody uses that" , and "Do not use additionally the DS18B20.h" library, because its possibly only "crucifying your code." (See #68).
Exactly such someone I needed to say, which is the common direction, the common mainstream what "everybody" uses, and which works reliably. Because there are so many other solutions existing, and how shall I know! Ok, of couse, I remember, you once said it "Use the Hacktronix" tutorial, but you know, this was one opinion of one forum user, and there are many opinions from many users, as you see. But even then, I said, I will follow your advice. And now, it is / was time to do that. So, I followed the tutorial and based on that, my code now is working, and looks like follows:

// This Arduino sketch reads DS18B20 "1-Wire" digital
// temperature sensors.
// Tutorial:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

// OLED-Display
  #include <U8x8lib.h>
  
// 1-wire
  #include <OneWire.h>
  #include <DallasTemperature.h>

// Data wire is plugged into pin X on the Arduino
  #define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices
  OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
  DallasTemperature sensors(&oneWire);

// Assign the addresses of your 1-Wire temp sensors.
// See the tutorial on how to obtain these addresses:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html
  DeviceAddress S01_ColdIntoPWT   = { 0x28, 0x41, 0x6B, 0x07, 0xD6, 0x01, 0x3C, 0xAA };   // S01_ColdIntoPWT   = TempSensors_Temps[0]
  DeviceAddress S02_ColdFromPWT   = { 0x28, 0x4F, 0xEA, 0x07, 0xD6, 0x01, 0x3C, 0xBF };   // S02_ColdFromPWT   = TempSensors_Temps[1]
  DeviceAddress S03_HotFromCompr  = { 0x28, 0xCF, 0xC2, 0x07, 0xD6, 0x01, 0x3C, 0x93 };   // S03_HotFromCompr  = TempSensors_Temps[2]
  DeviceAddress S04_HotFromPWT    = { 0x28, 0xD4, 0x45, 0x07, 0xD6, 0x01, 0x3C, 0xAA };   // S04_HotFromPWT    = TempSensors_Temps[3]
  DeviceAddress S05_AmbientOfUnit = { 0x28, 0xC9, 0x05, 0x07, 0xD6, 0x01, 0x3C, 0x52 };   // S05_AmbientOfUnit = TempSensors_Temps[4]
  DeviceAddress S06_InsideFluid   = { 0x28, 0xAA, 0xD5, 0xAC, 0x1D, 0x13, 0x02, 0xE5 };   // S06_InsideFluid   = TempSensors_Temps[5]
  DeviceAddress S07_CoolBoxS01    = { 0x28, 0xD4, 0xD1, 0xEA, 0x32, 0x14, 0x01, 0xDF };   // S07_CoolBoxS01    = TempSensors_Temps[6]
  DeviceAddress S08_CoolBoxS02    = { 0x28, 0xAA, 0xC3, 0xDB, 0x1D, 0x13, 0x02, 0x2B };   // S08_CoolBoxS02    = TempSensors_Temps[7]


  static float TempSensors_Temps[8];                          // Array which holds the current temperatures of all 1-wire temperature sensors

/****************** Constructors ******************************************************/
// OLED-Display
  U8X8_SH1106_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);       // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  // Start up the library
  sensors.begin();
  // set the resolution to 12 bit
  sensors.setResolution(S01_ColdIntoPWT, 12);
  sensors.setResolution(S02_ColdFromPWT, 12);
  sensors.setResolution(S03_HotFromCompr, 12);
  sensors.setResolution(S04_HotFromPWT, 12);
  sensors.setResolution(S05_AmbientOfUnit, 12);
  sensors.setResolution(S06_InsideFluid, 12);
  sensors.setResolution(S07_CoolBoxS01, 12);
  sensors.setResolution(S08_CoolBoxS02, 12);  
  
  // OLED-Display
    u8x8.begin();
    u8x8.setPowerSave(0);
  
  // Write to OLED-Display
    u8x8.setFont(u8x8_font_chroma48medium8_r);
    u8x8.drawString(0,0,"Starting up...");
    u8x8.refreshDisplay();    // only required for SSD1606/7

// Show setup display 2 seconds long
  delay(2000);

// Clear display in order that some remaining characters are not displayed during the loop. E.g. If here in setup it says "Temperatures:" and later in the loop just say "Temps:" in the same line, that it doesn't write: "Temps:atures:"
  u8x8.clear();
}

float printTemperature(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC == -127.00) {
    Serial.print("Error getting temperature");
  } else {
    Serial.print("C: ");
    Serial.print(tempC);
    Serial.print(" F: ");
    Serial.print(DallasTemperature::toFahrenheit(tempC));
  }
  return(tempC);
}

void loop(void)
{ 
  delay(2000);
  Serial.print("Getting temperatures...\n\r");
  sensors.requestTemperatures();
  
  Serial.print("S01_ColdIntoPWT: ");
  printTemperature(S01_ColdIntoPWT);
  Serial.print("\n\r");
  
  Serial.print("S02_ColdFromPWT: ");
  printTemperature(S02_ColdFromPWT);
  Serial.print("\n\r");
  
  Serial.print("S03_HotFromCompr: ");
  printTemperature(S03_HotFromCompr);
  Serial.print("\n\r");
  
  Serial.print("S04_HotFromPWT: ");
  printTemperature(S04_HotFromPWT);
  Serial.print("\n\r");
  
  Serial.print("S05_AmbientOfUnit: ");
  printTemperature(S05_AmbientOfUnit);
  Serial.print("\n\r");
  
  Serial.print("S06_InsideFluid: ");
  printTemperature(S06_InsideFluid);
  Serial.print("\n\r");
  
  Serial.print("S07_CoolBoxS01: ");
  printTemperature(S07_CoolBoxS01);
  Serial.print("\n\r");
  
  Serial.print("S08_CoolBoxS02: ");
  printTemperature(S08_CoolBoxS02);
  Serial.print("\n\r\n\r");

  // Get the temperatures into a variable
    TempSensors_Temps[0] = printTemperature(S01_ColdIntoPWT);
    TempSensors_Temps[1] = printTemperature(S02_ColdFromPWT);
    TempSensors_Temps[2] = printTemperature(S03_HotFromCompr);
    TempSensors_Temps[3] = printTemperature(S04_HotFromPWT);
    TempSensors_Temps[4] = printTemperature(S05_AmbientOfUnit);
    TempSensors_Temps[5] = printTemperature(S06_InsideFluid);
    TempSensors_Temps[6] = printTemperature(S07_CoolBoxS01);
    TempSensors_Temps[7] = printTemperature(S08_CoolBoxS02);
    
  // Write temperatures to OLED-Display
  	u8x8.drawString(0, 0, "CI");   // Cold Into the plate heat exchanger
  	u8x8.drawString(0, 1, "CO");   // Cold Out of the plate heat exchanger
  	u8x8.drawString(0, 2, "HC");   // Hot out of the Compressor
  	u8x8.drawString(0, 3, "HO");   // Hot Out of the plate heat exchanger
  	u8x8.drawString(0, 4, "AT");   // Ambient Temperature
  	u8x8.drawString(0, 5, "IF");   // Inside Fluid
  	u8x8.drawString(0, 6, "S1");   // CoolBox inside Sensor 01
  	u8x8.drawString(0, 7, "S2");   // CoolBox inside Sensor 02

    u8x8.setCursor(3,0);  // Set cursor to column 3 of display (starting with column "0")
    
  	for (uint8_t i = 0; i < 8; i++) {  
  	  u8x8.setCursor(3,i);  // Set cursor to column 3 of display (starting with column "0")
  	  u8x8.print(TempSensors_Temps[i],2);
  	}
}

I needed to add / change a bit: I introduced a variable "static float TempSensors_Temps[8];" where I can store all the temperatures and finally write it to an OLED display, that I can see and check now, if the microcontroller did not hang up and if there are no "+85" and or "-127" degrees reading, and I don't need to connect to a computer over the serial port each time. So I started it now, and will see, if tomorrow the thing is still alive. And I changed one subprogram from original to "float printTemperature(DeviceAddress deviceAddress)" and included "return(tempC);" Ah, and yes,and I am sorry, I recently wrote "I have 7 sensors" but actually I have 8 (from 0 to 7), so sorry for any confusion caused, this was a mistake.
About your comment about the 2nd line: If everything is working fine, I do not need the 2nd GPIO 1-wire bus line, just in case it's not, I found it a good idea of "zbylan" to split it into 2 groups.
Since programming is not my strength, I hope, I did these small modifications correctly? Is it ok? I know, it can be programmed more elegantly, but I mean now generally with the data types, or that I did not introduce a line, where the code could hang up?
And a question remains: I let now the "2s" delay from the tutorial, but for other reasons I need to go to the "milis" with loop time "1s". Will the sensors with this above code now be read asynchronously and when the conversion is finished, just write their temperatures in the next loop cycle? That would be fine for me. Important is not to block / extend the 1s loop program, because the flow meter depends on correct 1s timing. And I have to have enough time margin since other things shall be included (I2C handling, etc.).

THANK YOU SO MUCH AGAIN, "Nick_Pyner" for clearly stating this what to use, what not to use. This is helping me really further.

Bye,
bernd2700