def __init__(self, address=0x77, mode=3): self.i2c = PyComms(address) self.address = address # Make sure the specified mode is in the appropriate range if ((mode < 0) | (mode > 3)): self.mode = self.__BMP085_STANDARD else: self.mode = mode # Read the calibration data self.readCalibrationData()
def __init__(self, address=HMC5883L_DEFAULT_ADDRESS): self.i2c = PyComms(address) self.address = address
def __init__(self, address=0x40): self.i2c = PyComms(address) self.address = address self.i2c.write8(self.__MODE1, 0x00)
def __init__(self, address=HMC5883L_DEFAULT_ADDRESS, channel=1): self.i2c = PyComms(address, channel) self.address = address