Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(19)  |  Call(19)  |  Derive(0)  |  Import(0)

src/a/d/Adafruit-Raspberry-Pi-Python-Code-HEAD/Adafruit_MCP230xx/Adafruit_MCP230xx.py   Adafruit-Raspberry-Pi-Python-Code(Download)
        if num_gpios <= 8:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.i2c.write8(MCP23008_GPPUA, 0x00)
        elif num_gpios > 8 and num_gpios <= 16:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.i2c.write8(MCP23017_IODIRB, 0xFF)  # all inputs on port B
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.direction |= self.i2c.readU8(MCP23017_IODIRB) << 8

src/r/a/raspberry-pi-lcd-1.1.1/lcd/Adafruit_MCP230xx.py   raspberry-pi-lcd(Download)
        if num_gpios <= 8:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.i2c.write8(MCP23008_GPPUA, 0x00)
        elif num_gpios > 8 and num_gpios <= 16:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.i2c.write8(MCP23017_IODIRB, 0xFF)  # all inputs on port B
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.direction |= self.i2c.readU8(MCP23017_IODIRB) << 8

src/e/w/EweeStats-0.0dev3/EweeStats/Adafruit_MCP230xx.py   EweeStats(Download)
        if num_gpios <= 8:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.i2c.write8(MCP23008_GPPUA, 0x00)
        elif num_gpios > 8 and num_gpios <= 16:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.i2c.write8(MCP23017_IODIRB, 0xFF)  # all inputs on port B
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.direction |= self.i2c.readU8(MCP23017_IODIRB) << 8

src/r/p/rpihacks-HEAD/Adafruit_CharLCDPlate/Adafruit_MCP230xx.py   rpihacks(Download)
        if num_gpios <= 8:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.i2c.write8(MCP23008_GPPUA, 0x00)
        elif num_gpios > 8 and num_gpios <= 16:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.i2c.write8(MCP23017_IODIRB, 0xFF)  # all inputs on port B
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.direction |= self.i2c.readU8(MCP23017_IODIRB) << 8

src/r/p/rpi-timelapse-HEAD/Adafruit_MCP230xx.py   rpi-timelapse(Download)
        if num_gpios <= 8:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.i2c.write8(MCP23008_GPPUA, 0x00)
        elif num_gpios > 8 and num_gpios <= 16:
            self.i2c.write8(MCP23017_IODIRA, 0xFF)  # all inputs on port A
            self.i2c.write8(MCP23017_IODIRB, 0xFF)  # all inputs on port B
            self.direction = self.i2c.readU8(MCP23017_IODIRA)
            self.direction |= self.i2c.readU8(MCP23017_IODIRB) << 8

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/gyroscope/L3GD20.py   FishPi-POCV---Command---Control(Download)
        self.gyro = Adafruit_I2C(self.L3GD20_ADDRESS, busnum, debug)
 
        if self.gyro.readU8(self.L3GD20_REGISTER_WHO_AM_I) != self.L3GD20_ID:
            logging.error("GYRO:\tWrong device ID")
            return None

src/a/d/Adafruit-Raspberry-Pi-Python-Code-HEAD/Adafruit_ADXL345/Adafruit_ADXL345.py   Adafruit-Raspberry-Pi-Python-Code(Download)
    def __init__(self, busnum=-1, debug=False):
 
        self.accel = Adafruit_I2C(self.ADXL345_ADDRESS, busnum, debug)
 
        if self.accel.readU8(self.ADXL345_REG_DEVID) == 0xE5:

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/GPS_I2C.py   FishPi-POCV---Command---Control(Download)
        if self.debug:
            logging.debug("SENSOR:\tGPS_I2C:\tChecking firmware version...")
        self.version = self.i2c.readU8(self.I2C_GPS_REG_VERSION)
        if self.debug:
            logging.debug("SENSOR:\tGPS_I2C:\tFirmware v:%d", self.version)

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/compass_CMPS10.py   FishPi-POCV---Command---Control(Download)
        self.address = address
        self.debug = debug
        self.version = self.i2c.readU8(0)
        if self.debug:
            logging.debug("SENSOR:\tCMPS10:\tSoftware v:%d", self.version)