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

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

src/r/a/raspberrypi-experiments-HEAD/Servo_Driver_Library/examples/spacebrew_servos/servoDriver/Adafruit_Libs/Adafruit_PWM_Servo_Driver.py   raspberrypi-experiments(Download)
		if (self.debug):
			print "Reseting PCA9685"
		self.i2c.write8(self.__MODE1, 0x00)
 
	def setPWMFreq(self, freq):

src/r/a/raspberrypi-experiments-HEAD/Servo_Driver_Library/examples/basic_servos/servoDriver/Adafruit_Libs/Adafruit_PWM_Servo_Driver.py   raspberrypi-experiments(Download)
		if (self.debug):
			print "Reseting PCA9685"
		self.i2c.write8(self.__MODE1, 0x00)
 
	def setPWMFreq(self, freq):

src/r/a/raspberrypi-experiments-HEAD/Linear_Actuator_Library/examples/spacebrew_bar_graph/Adafruit_Libs/Adafruit_PWM_Servo_Driver.py   raspberrypi-experiments(Download)
		if (self.debug):
			print "Reseting PCA9685"
		self.i2c.write8(self.__MODE1, 0x00)
 
	def setPWMFreq(self, freq):

src/a/d/Adafruit-Raspberry-Pi-Python-Code-HEAD/Adafruit_MCP230xx/Adafruit_MCP230xx.py   Adafruit-Raspberry-Pi-Python-Code(Download)
        # set defaults
        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
            self.i2c.write8(MCP23017_GPPUA, 0x00)
            self.i2c.write8(MCP23017_GPPUB, 0x00)
 

src/r/a/raspberry-pi-lcd-1.1.1/lcd/Adafruit_MCP230xx.py   raspberry-pi-lcd(Download)
        # set defaults
        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
            self.i2c.write8(MCP23017_GPPUA, 0x00)
            self.i2c.write8(MCP23017_GPPUB, 0x00)
 

src/e/w/EweeStats-0.0dev3/EweeStats/Adafruit_MCP230xx.py   EweeStats(Download)
        # set defaults
        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
            self.i2c.write8(MCP23017_GPPUA, 0x00)
            self.i2c.write8(MCP23017_GPPUB, 0x00)
 

src/r/p/rpihacks-HEAD/Adafruit_CharLCDPlate/Adafruit_MCP230xx.py   rpihacks(Download)
        # set defaults
        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
            self.i2c.write8(MCP23017_GPPUA, 0x00)
            self.i2c.write8(MCP23017_GPPUB, 0x00)
 

src/r/p/rpi-timelapse-HEAD/Adafruit_MCP230xx.py   rpi-timelapse(Download)
        # set defaults
        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
            self.i2c.write8(MCP23017_GPPUA, 0x00)
            self.i2c.write8(MCP23017_GPPUB, 0x00)
 

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/gyroscope/L3GD20.py   FishPi-POCV---Command---Control(Download)
 
        #  Switch to normal mode and enable all three channels
        self.gyro.write8(self.L3GD20_REGISTER_CTRL_REG1, 0x0F)
 
        # Adjust resolution
        if rng == L3GD20_range.R250DPS:
            self.gyro.write8(self.L3GD20_REGISTER_CTRL_REG4, 0x00)
            self.sensitivity = self.L3GD20_SENSITIVITY_250DPS
        elif rng == L3GD20_range.R500DPS:
            self.gyro.write8(self.L3GD20_REGISTER_CTRL_REG4, 0x10)
            self.sensitivity = self.L3GD20_SENSITIVITY_500DPS
        elif rng == L3GD20_range.R2000DPS:
            self.gyro.write8(self.L3GD20_REGISTER_CTRL_REG4, 0x20)
            self.sensitivity = self.L3GD20_SENSITIVITY_2000DPS
 

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/compass/Adafruit_LSM303.py   FishPi-POCV---Command---Control(Download)
 
        # Enable the accelerometer
        self.accel.write8(self.LSM303_REGISTER_ACCEL_CTRL_REG1_A, 0x27)
        # Select hi-res (12-bit) or low-res (10-bit) output mode.
        # Low-res mode uses less power and sustains a higher update rate,
        # output is padded to compatible 12-bit units.
        if hires:
            self.accel.write8(self.LSM303_REGISTER_ACCEL_CTRL_REG4_A,
              0b00001000)
        else:
            self.accel.write8(self.LSM303_REGISTER_ACCEL_CTRL_REG4_A, 0)
 
        # Enable the magnetometer
        self.mag.write8(self.LSM303_REGISTER_MAG_MR_REG_M, 0x00)

  1 | 2 | 3  Next