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

All Samples(94)  |  Call(43)  |  Derive(9)  |  Import(42)

src/r/a/raspberrypi-experiments-HEAD/Servo_Driver_Library/examples/spacebrew_servos/servoDriver/Adafruit_Libs/Adafruit_PWM_Servo_Driver.py   raspberrypi-experiments(Download)
import math
import smbus
from Adafruit_I2C import Adafruit_I2C
 
# ============================================================================
	def __init__(self, address=0x40, debug=False):
		self.i2c = Adafruit_I2C(address,bus=smbus.SMBus(1))
		self.address = address
		self.debug = debug
		if (self.debug):

src/r/a/raspberrypi-experiments-HEAD/Servo_Driver_Library/examples/basic_servos/servoDriver/Adafruit_Libs/Adafruit_PWM_Servo_Driver.py   raspberrypi-experiments(Download)
import math
import smbus
from Adafruit_I2C import Adafruit_I2C
 
# ============================================================================
	def __init__(self, address=0x40, debug=False):
		self.i2c = Adafruit_I2C(address,bus=smbus.SMBus(1))
		self.address = address
		self.debug = debug
		if (self.debug):

src/r/a/raspberrypi-experiments-HEAD/Linear_Actuator_Library/examples/spacebrew_bar_graph/Adafruit_Libs/Adafruit_PWM_Servo_Driver.py   raspberrypi-experiments(Download)
import math
import smbus
from Adafruit_I2C import Adafruit_I2C
 
# ============================================================================
	def __init__(self, address=0x40, debug=False):
		self.i2c = Adafruit_I2C(address,bus=smbus.SMBus(1))
		self.address = address
		self.debug = debug
		if (self.debug):

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/temperature_TMP102.py   FishPi-POCV---Command---Control(Download)
 
# from Adafruit_I2C import Adafruit_I2C
from Adafruit_I2C import Adafruit_I2C
 
class TemperatureSensor:
    """ Temperature Sensor using Tmp102 TI chip over I2C """
 
    def __init__(self, address=0x48, interface="", hw_interface="-1", debug=False):
        if hw_interface is None:
            self.i2c = Adafruit_I2C(address, debug=debug)
    def __init__(self, address=0x48, interface="", hw_interface="-1", debug=False):
        if hw_interface is None:
            self.i2c = Adafruit_I2C(address, debug=debug)
        else:
            self.i2c = Adafruit_I2C(address, busnum=int(hw_interface), debug=debug)

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/compass_CMPS10.py   FishPi-POCV---Command---Control(Download)
import logging
# from Adafruit_I2C import Adafruit_I2C
from Adafruit_I2C import Adafruit_I2C
 
class Cmps10_Sensor:
    """ Tilt adjusted Compass sensor CMP10 over I2C. """
 
    def __init__(self, address=0x60, interface="", hw_interface="-1", debug=False):
        if hw_interface is None:
            self.i2c = Adafruit_I2C(address, debug=debug)
    def __init__(self, address=0x60, interface="", hw_interface="-1", debug=False):
        if hw_interface is None:
            self.i2c = Adafruit_I2C(address, debug=debug)
        else:
            self.i2c = Adafruit_I2C(address, busnum=int(hw_interface), debug=debug)

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/vehicle/drive_controller.py   FishPi-POCV---Command---Control(Download)
 
# from Adafruit_I2C import Adafruit_I2C
from Adafruit_I2C import Adafruit_I2C
 
class DriveController(object):
        #     hw_interface = "-1"     # need better solution here!!
        if hw_interface == "-1":
            self.i2c_bus = Adafruit_I2C(i2c_addr, debug=debug)
        else:
            self.i2c_bus = Adafruit_I2C(i2c_addr, busnum=int(hw_interface), debug=debug)

src/f/i/FishPi-POCV---Command---Control-HEAD/fishpi/sensor/GPS_I2C.py   FishPi-POCV---Command---Control(Download)
 
# from Adafruit_I2C import Adafruit_I2C
from Adafruit_I2C import Adafruit_I2C
 
class GPS_NavigatronSensor:
    def __init__(self, address=0x20, interface="", hw_interface="-1", debug=False):
        if hw_interface == "-1":
            self.i2c = Adafruit_I2C(address, debug=debug)
        else:
            self.i2c = Adafruit_I2C(address, busnum=int(hw_interface), debug=debug)

src/p/i/pigredients-HEAD/pigredients/ics/mpu6050.py   pigredients(Download)
import math
 
from Adafruit_I2C import Adafruit_I2C
 
from pigredients.core.bitman import BitSequence
        # Create our i2c connection
        if i2c_bus is None:
            self.i2c = Adafruit_I2C(i2c_address, debug=self.debug)
        else:
            self._bus = smbus.SMBus(i2c_bus) 
            self.i2c = Adafruit_I2C(i2c_address, bus=self._bus, debug=self.debug)

src/p/i/pigredients-HEAD/pigredients/ics/hmc5883l.py   pigredients(Download)
import math
 
from Adafruit_I2C import Adafruit_I2C
 
_hmc5883l_address = 0x1e
        # Create our i2c connection
        self._bus = smbus.SMBus(i2c_bus) 
        self.i2c = Adafruit_I2C(i2c_address, bus=self._bus, debug=self.debug)
 
        # set our compass to continuous mode.

src/r/p/rpi-timelapse-HEAD/Adafruit_MCP230xx.py   rpi-timelapse(Download)
# SOFTWARE.
 
from Adafruit_I2C import Adafruit_I2C
import smbus
import time
    def __init__(self, address, num_gpios, busnum = 0):
        assert num_gpios >= 0 and num_gpios <= 16, "Number of GPIOs must be between 0 and 16"
        self.i2c = Adafruit_I2C(address=address, bus=smbus.SMBus(busnum))     
        self.address = address
        self.num_gpios = num_gpios

  1 | 2 | 3 | 4 | 5  Next