func New(deviceAdress uint8, i2cbus byte) *BMP180 { deviceBus := i2c.NewI2CBus(i2cbus) d := &BMP180{ Dev: deviceBus, Address: deviceAdress, } return d }
func New(deviceAdress uint8, i2cbus byte) *SX1509 { deviceBus := i2c.NewI2CBus(i2cbus) d := &SX1509{ Dev: deviceBus, Address: deviceAdress, } return d }
func New(deviceAdress uint8, i2cbus byte) *INA219 { deviceBus := i2c.NewI2CBus(i2cbus) d := &INA219{ Dev: deviceBus, Configuation: INA219_CONFIG_BVOLTAGERANGE_16V | INA219_CONFIG_GAIN_8_320MV | INA219_CONFIG_BADCRES_12BIT | INA219_CONFIG_SADCRES_12BIT_128S_69MS | INA219_CONFIG_MODE_SANDBVOLT_CONTINUOUS, CalibrationValue: 6826, Address: deviceAdress, // err: make(chan error), // temp: make(chan float64), // state: make(chan statefn), } return d }