Esempio n. 1
0
    def __init__(self):
        #self.bus = smbus.SMBus(1)
        #self.address = 0x40
        #self.bus.write_byte_data(self.address, CMD_SOFT_RESET)

        self.dev = i2c_base.i2c(HTU21D_ADDR, 1)  # HTU21D 0x40, bus 1
        self.dev.write(CMD_SOFT_RESET)  # Soft reset
        time.sleep(.1)
Esempio n. 2
0
 def __init__(self):
     self.dev = i2c_base.i2c(HTU21D_ADDR, 1)  # HTU21D 0x40, bus 1
     self.dev.write(CMD_SOFT_RESET)  # Soft reset
     time.sleep(.1)
Esempio n. 3
0
 def __init__(self):
     self.dev = i2c_base.i2c(HTU21D_ADDR, 1)  # HTU21D 0x40, bus 1
     self.dev.write(CMD_SOFT_RESET)  # Soft reset
     time.sleep(.1)
Esempio n. 4
0
 def __init__(self, address=0x69):
     self.dev = i2c_base.i2c(address, 1)
     self.max = 32767.0  #15 bits
     self.vref = 2.048
     self.tolerance_percent = 0.5
     self.reset()
Esempio n. 5
0
 def __init__(self, address = 0x69):
     self.dev = i2c_base.i2c(address, 1)
     self.max = 32767.0 #15 bits
     self.vref = 2.048
     self.tolerance_percent = 0.5
     self.reset()
Esempio n. 6
0
 def __init__(self, address = 0x69):
     self.dev = i2c_base.i2c(address, 1)
     self.max = 32767.0 #15 bits
     if MCP342X.shared == None:
         MCP342X.shared = self
     self.reset()
Esempio n. 7
0
 def __init__(self, address = 0x69):
     self.dev = i2c_base.i2c(address, 1)
     self.max = 32767.0 #15 bits
     self.reset()