Skip to content

thermometers

Arnd edited this page Dec 12, 2020 · 2 revisions

This variable contains the number of DS1631 thermometers detected during a call the begin() function. Note - while this variable is not protected and can be changed, the results will be unpredictable thereafter if an out-of-bounds value is set.


Example:

DS1631_Class DS1631; // Create an instance of the DS1631 class
...
void setup() {
  Serial.begin(SERIAL_SPEED);
  while (!DS1631.begin()) { // Initialize I2C communications
    Serial.println("Unable to find DS1631. Checking again in 3 seconds.");
    delay(3000);
  } // of loop until device is located
  Serial.print("Detected ");
  Serial.print(DS1631.thermometers);
  Serial.println(" DS1631 devices.");
...
} // of setup
Clone this wiki locally