Documentation ¶
Overview ¶
Package ds18b20 provides a driver for the DS18B20 digital thermometer
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/DS18B20.pdf
Index ¶
Constants ¶
View Source
const ( CONVERT_TEMPERATURE uint8 = 0x44 READ_SCRATCHPAD uint8 = 0xBE WRITE_SCRATCHPAD uint8 = 0x4E )
Device ROM commands
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device wraps a connection to an 1-Wire devices.
func New ¶
func New(owd OneWireDevice) Device
func (Device) Configure ¶
func (d Device) Configure()
Configure. Initializes the device, left for compatibility reasons.
func (Device) ReadTemperature ¶
ReadTemperature returns the temperature in celsius milli degrees (°C/1000)
func (Device) ReadTemperatureRaw ¶
ReadTemperatureRaw returns the raw temperature. ScratchPad memory map: byte 0: Temperature LSB byte 1: Temperature MSB
func (Device) RequestTemperature ¶
RequestTemperature sends request to device
func (Device) ThermometerResolution ¶
ThermometerResolution sets thermometer resolution from 9 to 12 bits
Click to show internal directories.
Click to hide internal directories.