Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Default I2C address Address = 0x48 // Temperature Value MSB Register RegTempValueMSB = 0x0 // Temperature Value LSB Register RegTempValueLSB = 0x1 // Status Register RegStatus = 0x2 // Config Register RegConfig = 0x3 // ID Register RegID = 0x0B // Software Reset Register RegReset = 0x2F )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func New ¶
New returns ADT7410 device for the provided I2C bus and address. The ADT7410 has a default address of 0x48 (1001000). The last 2 bits of the address can be set using by connecting to the A1 and A0 pins to VDD or GND (for a total of up to 4 devices on a I2C bus). Also note that 10k pullups are recommended for the SDA and SCL lines.
func (*Device) ReadTempC ¶
ReadTempC returns the value in the temperature value register, in Celcius
func (*Device) ReadTempF ¶
ReadTempF returns the value in the temperature value register, in Fahrenheit
func (*Device) ReadTemperature ¶
ReadTemperature returns the temperature in celsius milli degrees (ºC/1000)
Click to show internal directories.
Click to hide internal directories.