-
Notifications
You must be signed in to change notification settings - Fork 0
setPrecision()
Arnd edited this page Aug 24, 2017
·
1 revision
The DS1361 has 4 different precisions available, each of which takes a different amount of time to complete. The possible values are as follow:
Precision | Time | Accuracy |
---|---|---|
9 | 93.75ms | 0.5°C |
10 | 187.5ms | 0.25°C |
11 | 375ms | 0.125°C |
12 | 750ms | 0.0625°C |
DS1631_Class DS1631; // Create an instance of the DS1631
...
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.");
...
for (uint8_t i=0;i<DS1631.thermometers;i++) {
DS1631.setPrecision(12); // Set to 0.0625°c and 750ms conversion
} // of for-next each thermometer loop
} // of setup
...