|
| | MiniR4DS18B20 () |
| |
| void | setResolution (uint8_t res, uint8_t idx=0) |
| | Sets the resolution for a specific sensor.
|
| |
| void | setResolutionAll (uint8_t res) |
| | Sets the resolution for all sensors on the line.
|
| |
| void | setAddress (uint8_t *addr) |
| | Set the address of the sensor.
|
| |
| bool | readAddress (uint8_t *addr) |
| | Reads the unique address of the sensor.
|
| |
| void | requestTemp (uint8_t idx=0) |
| | Requests a temperature conversion from a specific sensor.
|
| |
| void | requestTempAll () |
| | Requests a temperature conversion from all sensors on the line.
|
| |
| float | getTemp (uint8_t idx=0) |
| | Gets the temperature as a float from a specific sensor.
|
| |
| float | requestAndGetTemp (uint8_t idx=0) |
| | Combines request and get temperature operations.
|
| |
| int16_t | getTempInt (uint8_t idx=0) |
| | Gets the temperature as an integer from a specific sensor.
|
| |
| int16_t | getRaw (uint8_t idx=0) |
| | Gets the raw temperature data from a specific sensor.
|
| |
| bool | readTemp (uint8_t idx=0) |
| | Reads the temperature from a specific sensor.
|
| |
| bool | online (uint8_t idx=0) |
| | Checks if the sensor is online.
|
| |
template<uint8_t PIN1, uint8_t PIN2, uint8_t * DS_ADDR = (uint8_t * ) nullptr, uint8_t DS_AM = 1, bool DS_PGM = 0>
class MiniR4DS18B20< PIN1, PIN2, DS_ADDR, DS_AM, DS_PGM >
Template class for interfacing with DS18B20 temperature sensors.
This class allows interfacing with DS18B20 sensors using the 1-Wire protocol. It supports multiple sensors on the same line, addressable mode, and CRC checks.
- Template Parameters
-
| PIN1 | Unused pin (for future use). |
| PIN2 | The GPIO pin number where the sensor is connected. |
| DS_ADDR | Pointer to the sensor's address. |
| DS_AM | Number of sensors on the line. |
| DS_PGM | If true, addresses are stored in PROGMEM. |
Definition at line 78 of file MiniR4_DS18B20.h.
template<uint8_t PIN1, uint8_t PIN2, uint8_t * DS_ADDR = (uint8_t * ) nullptr, uint8_t DS_AM = 1, bool DS_PGM = 0>
| float MiniR4DS18B20< PIN1, PIN2, DS_ADDR, DS_AM, DS_PGM >::getTemp |
( |
uint8_t | idx = 0 | ) |
|
|
inline |
Gets the temperature as a float from a specific sensor.
- Parameters
-
| idx | Index of the sensor (default: 0). |
- Returns
- Temperature in Celsius as a float.
Definition at line 160 of file MiniR4_DS18B20.h.
template<uint8_t PIN1, uint8_t PIN2, uint8_t * DS_ADDR = (uint8_t * ) nullptr, uint8_t DS_AM = 1, bool DS_PGM = 0>
| int16_t MiniR4DS18B20< PIN1, PIN2, DS_ADDR, DS_AM, DS_PGM >::getTempInt |
( |
uint8_t | idx = 0 | ) |
|
|
inline |
Gets the temperature as an integer from a specific sensor.
- Parameters
-
| idx | Index of the sensor (default: 0). |
- Returns
- Temperature in Celsius as an integer.
Definition at line 182 of file MiniR4_DS18B20.h.