-
Notifications
You must be signed in to change notification settings - Fork 2
GetDeviceResolution()
Arnd edited this page Dec 12, 2020
·
2 revisions
This function return the bits of resolution (9, 10, 11 or 12) set for DeviceIndex. This will return a 0 for invalid device numbers and is set during the call to ScanForDevices().
const uint8_t ONE_WIRE_PIN = 8; // 1-Wire microLAN pin
DSFamily_Class ds(ONE_WIRE_PIN); // Instantiate
uint8_t thermometers = ds.ScanForDevices(); // find all devices
for (uint8_t i=0;i<thermometers;i++) {
Serial.print("Device ");
Serial.print(i);
Serial.print(" has "):
Serial.print(ds.GetDeviceResolution(i));
Serial.println(" bits of precision set.");
} // of for-next loop
Overview
Installation
Class Instantiation
ScanForDevices()
ReadDeviceTemp()
DeviceStartConvert()
GetDeviceResolution()
SetDeviceResolution()
Calibrate()
GetDeviceCalibration()
SetDeviceCalibration()
GetDeviceROM()
crc8()
MinTemperature()
MaxTemperature()
AvgTemperature()
StdDevTemperature()