Skip to content
Python package to support multi platform I2C bus integrations
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs debug Jul 3, 2019
qwiic_i2c Added a retry loop for the read methods -- were seeing issues with so… Jul 12, 2019
.readthedocs.yml thrashing Jul 3, 2019
DESCRIPTION.rst fleshing out the installer Jun 21, 2019
LICENSE license! Jun 25, 2019
README.md Update README.md Jul 11, 2019
setup.cfg fleshing out the installer Jun 21, 2019
setup.py version ++ Jul 12, 2019

README.md

Qwiic_I2C_Py

follow on Twitter

Python package to support multi platform I2C bus integrations for the SparkFun qwiic ecosystem

This package can be used in conjunction with the overall SparkFun qwiic Python Package

New to qwiic? Take a look at the entire SparkFun qwiic ecosystem.

Contents

Supported Platforms

The qwiic I2C Python package current supports the following platforms:

Dependencies

The Raspberry Pi/Single Board Computer Linux driver of this package is dependent on smbus

Documentation

The SparkFun qwiic I2C module documentation is hosted at ReadTheDocs

Installation

PyPi Installation

This repository is hosted on PyPi as the sparkfun-qwiic-i2c package. On systems that support PyPi installation via pip, this library is installed using the following commands

For all users (note: the user must have sudo privileges):

sudo pip install sparkfun-qwiic-i2c

For the current user:

pip install sparkfun-qwiic-i2c

Local Installation

To install, make sure the setuptools package is installed on the system.

Direct installation at the command line:

python setup.py install

To build a package for use with pip:

python setup.py sdist

A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.

cd dist
pip install sparkfun_qwiic_i2c-<version>.tar.gz

Examples

This package is used extensively by the python modules for the SparkFun qwiic ecosystem. References to the modules can be found in the qwiic python package

General package use examples:

import qwiic_i2c
connectedDevices = i2cDriver.scan()
if myDeviceAddress in connectedDevices:
	with qwiic_i2c.getI2CDriver() as i2c:
		i2c.writeByte(myDeviceAddress, register, 0x3F)
import qwiic_i2c
>>> if qwiic_i2c.isDeviceConnected(myDeviceAddress):
        with qwiic_i2c.getI2CDriver() as i2c:
                i2c.writeByte(myDeviceAddress, register, 0x3F)

SparkFun - Start Something

You can’t perform that action at this time.