|
Adafruit MAX31850 DallasTemp Library
|
DallasTemperature class. More...
#include <DallasTemperature.h>
Public Member Functions | |
| DallasTemperature (OneWire *) | |
| DallasTemp constructor. | |
| void | begin (void) |
| initalise the bus | |
| uint8_t | getDeviceCount (void) |
| returns the number of devices found on the bus More... | |
| bool | isConversionComplete (void) |
| Checks if a conversion is complete on the wire. More... | |
| bool | validAddress (uint8_t *) |
| returns true if address is valid More... | |
| bool | getAddress (uint8_t *, const uint8_t) |
| finds an address at a given index on the bus More... | |
| bool | isConnected (uint8_t *) |
| attempt to determine if the device at the given address is connected to the bus More... | |
| bool | isConnected (uint8_t *, uint8_t *) |
| attempt to determine if the device at the given address is connected to the bus also allows for updating the read scratchpad More... | |
| void | readScratchPad (uint8_t *, uint8_t *) |
| read device's scratchpad More... | |
| void | writeScratchPad (uint8_t *, const uint8_t *) |
| write device's scratchpad More... | |
| bool | readPowerSupply (uint8_t *) |
| read device's power requirements More... | |
| uint8_t | getResolution () |
| gets global resolution More... | |
| void | setResolution (uint8_t) |
| set global resolution to 9, 10, 11, or 12 bits More... | |
| uint8_t | getResolution (uint8_t *) |
| Returns the device resolution, 9-12. More... | |
| bool | setResolution (uint8_t *, uint8_t) |
| set resolution of a device to 9, 10, 11, or 12 bits More... | |
| void | setWaitForConversion (bool) |
| sets the waitForConversion flag More... | |
| bool | getWaitForConversion (void) |
| gets the value of the waitForConversion flag More... | |
| void | setCheckForConversion (bool) |
| sets the checkForConversion flag More... | |
| bool | getCheckForConversion (void) |
| gets the value of the checkForConversion flag More... | |
| void | requestTemperatures (void) |
| sends command for all devices on the bus to perform a temperature conversion | |
| bool | requestTemperaturesByAddress (uint8_t *) |
| sends command for one device to perform a temperature conversion by address More... | |
| bool | requestTemperaturesByIndex (uint8_t) |
| sends command for one device to perform a temperature conversion by index More... | |
| float | getTempC (uint8_t *) |
| returns temperature in degrees C or DEVICE_DISCONNECTED if the device's scratch pad cannot be read successfully. the numeric value of DEVICE_DISCONNECTED is defined in DallasTemperature.h. It is a large negative number outside the operating range of the device More... | |
| float | getTempF (uint8_t *) |
| returns temperature in degrees F More... | |
| float | getTempCByIndex (uint8_t) |
| Get temperature for device index (slow) More... | |
| float | getTempFByIndex (uint8_t) |
| Get temperature for device index (slow) More... | |
| bool | isParasitePowerMode (void) |
| returns true if the bus requires parasite power More... | |
| bool | isConversionAvailable (uint8_t *) |
| Checks if the clock has been raised indicating the conversion is complete. More... | |
Static Public Member Functions | |
| static float | toFahrenheit (const float) |
| convert float celsius to farenheit More... | |
| static float | toCelsius (const float) |
| convert float farenheit to celsius More... | |
DallasTemperature class.
| uint8_t DallasTemperature::getDeviceCount | ( | void | ) |
returns the number of devices found on the bus
| bool DallasTemperature::isConversionComplete | ( | void | ) |
Checks if a conversion is complete on the wire.
| bool DallasTemperature::validAddress | ( | uint8_t * | deviceAddress | ) |
returns true if address is valid
| deviceAddress | Address to determine the validity |
| bool DallasTemperature::getAddress | ( | uint8_t * | deviceAddress, |
| const uint8_t | index | ||
| ) |
finds an address at a given index on the bus
| deviceAddress | Device address to search for |
| index | Where on the index to search |
| bool DallasTemperature::isConnected | ( | uint8_t * | deviceAddress | ) |
attempt to determine if the device at the given address is connected to the bus
| deviceAddress | Address to search for |
| bool DallasTemperature::isConnected | ( | uint8_t * | deviceAddress, |
| uint8_t * | scratchPad | ||
| ) |
attempt to determine if the device at the given address is connected to the bus also allows for updating the read scratchpad
| deviceAddress | Address to check the connection |
| scratchPad | scratchPad to update |
| void DallasTemperature::readScratchPad | ( | uint8_t * | deviceAddress, |
| uint8_t * | scratchPad | ||
| ) |
read device's scratchpad
| deviceAddress | Address to read the scratchpad of |
| scratchPad | Scratch pad to read from |
| void DallasTemperature::writeScratchPad | ( | uint8_t * | deviceAddress, |
| const uint8_t * | scratchPad | ||
| ) |
write device's scratchpad
| deviceAddress | Address of the device to write to |
| scratchPad | Scratch pad to write to |
| bool DallasTemperature::readPowerSupply | ( | uint8_t * | deviceAddress | ) |
read device's power requirements
| deviceAddress | Address of the device to read from |
| uint8_t DallasTemperature::getResolution | ( | ) |
gets global resolution
| void DallasTemperature::setResolution | ( | uint8_t | newResolution | ) |
set global resolution to 9, 10, 11, or 12 bits
| newResolution | Resolution to set to |
| uint8_t DallasTemperature::getResolution | ( | uint8_t * | deviceAddress | ) |
Returns the device resolution, 9-12.
| deviceAddress | Device to get the resolution of |
| bool DallasTemperature::setResolution | ( | uint8_t * | deviceAddress, |
| uint8_t | newResolution | ||
| ) |
set resolution of a device to 9, 10, 11, or 12 bits
| deviceAddress | Address of device to set the resolution of |
| newResolution | Resolution to set |
| void DallasTemperature::setWaitForConversion | ( | bool | flag | ) |
sets the waitForConversion flag
| flag | What value to set the waitForConversion flag to |
| bool DallasTemperature::getWaitForConversion | ( | void | ) |
gets the value of the waitForConversion flag
| void DallasTemperature::setCheckForConversion | ( | bool | flag | ) |
sets the checkForConversion flag
| flag | What value to set the checkForConversion flag to |
| bool DallasTemperature::getCheckForConversion | ( | void | ) |
gets the value of the checkForConversion flag
| bool DallasTemperature::requestTemperaturesByAddress | ( | uint8_t * | deviceAddress | ) |
sends command for one device to perform a temperature conversion by address
| deviceAddress | Address of the desired device |
| bool DallasTemperature::requestTemperaturesByIndex | ( | uint8_t | deviceIndex | ) |
sends command for one device to perform a temperature conversion by index
| deviceIndex | Index of the device to send the command to |
| float DallasTemperature::getTempC | ( | uint8_t * | deviceAddress | ) |
returns temperature in degrees C or DEVICE_DISCONNECTED if the device's scratch pad cannot be read successfully. the numeric value of DEVICE_DISCONNECTED is defined in DallasTemperature.h. It is a large negative number outside the operating range of the device
| deviceAddress | Address of the device to get the temperature from |
| float DallasTemperature::getTempF | ( | uint8_t * | deviceAddress | ) |
returns temperature in degrees F
| deviceAddress | Address of the device to get the temperature from |
| float DallasTemperature::getTempCByIndex | ( | uint8_t | deviceIndex | ) |
Get temperature for device index (slow)
| deviceIndex | Index of the device |
| float DallasTemperature::getTempFByIndex | ( | uint8_t | deviceIndex | ) |
Get temperature for device index (slow)
| deviceIndex | Index of the device |
| bool DallasTemperature::isParasitePowerMode | ( | void | ) |
returns true if the bus requires parasite power
| bool DallasTemperature::isConversionAvailable | ( | uint8_t * | deviceAddress | ) |
Checks if the clock has been raised indicating the conversion is complete.
| deviceAddress | Address of the device to check |
|
static |
convert float celsius to farenheit
| celsius | Float of degrees celsius |
|
static |
convert float farenheit to celsius
| fahrenheit | Float of degrees fahrenheit |
1.8.13