Documentation ¶
Index ¶
Constants ¶
View Source
const ( REG_CONFIG byte = iota REG_SHUNT_VOLTAGE REG_BUS_VOLTAGE REG_POWER REG_CURRENT REG_CALIBRATION )
Register names and addresses.
View Source
const Address = 0x40
The I2C address which this device listens to by default.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device wraps an I2C connection to a INA219 device.
func New ¶
New creates a new INA219 connection. The I2C bus must already be configured.
This function only creates the Device object. It does not touch the device.
func (*Device) GetCurrent_uA ¶
func (*Device) GetPower_uW ¶
func (*Device) GetVoltage_mV ¶
Click to show internal directories.
Click to hide internal directories.