Пример #1
0
    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()
Пример #2
0
 def __init__(self, address=HMC5883L_DEFAULT_ADDRESS):
     self.i2c = PyComms(address)
     self.address = address
Пример #3
0
 def __init__(self, address=0x40):
     self.i2c = PyComms(address)
     self.address = address
     self.i2c.write8(self.__MODE1, 0x00)
Пример #4
0
 def __init__(self, address=HMC5883L_DEFAULT_ADDRESS, channel=1):
     self.i2c = PyComms(address, channel)
     self.address = address