Installation
Note:
Don't forget to double check that the hardware I C connection is enabled on your Raspberry Pi or other
single board computer.
PyPi Installation
This repository is hosted on PyPi as the
sparkfun-qwiic-gpio package
. On systems that support PyPi installation
via
pip3
(use
pip
for Python 2) is simple using the following commands:
For
all users
sudo pip3 install sparkfun-qwiic-gpio
For the
current user
:
pip3 install sparkfun-qwiic-gpio
Local Installation
To install, make sure the
setuptools
package is installed on the system.
Direct installation at the command line (use
python
for Python 2):
python3 setup.py install
To build a package for use with
pip3
:
python3 setup.py sdist
A package file is built and placed in a subdirectory called dist. This package file can be installed using
pip3
.
cd dist
pip3 install sparkfun_qwiic_gpio-<version>.tar.gz
Dependencies
This Python package has a few dependencies in the code, listed below:
from __future__ import print_function
import math
import qwiic_i2c
Function Overview
Python Examples
2