Digital Temperature Sensor Breakout - AS6212 (Qwiic) Hookup Guide

Pages
Contributors: QCPete, El Duderino
Favorited Favorite 1

Qwiic AS6212 Python Package

Note: This package and the included examples assume you are using the latest version of Python 3. If this is your first time using Python or I2C hardware on a Raspberry Pi, these tutorial can help you get started:

The Qwiic AS6212 Python package

The module is hosted on PyPi to make installation quick and painless with simple commands in the command interface. Users who prefer to manually install the package can find it on the GitHub Repository or download the ZIP of the repository by clicking the button below:

(*Please be aware this package depends on the Qwiic I2C Driver. You can also view the repository documentation page hosted on Read the Docs.)

Qwiic AS6212 Py Installation

Now we'll cover the two installation methods for the Qwiic AS6212 Python package.

Note: Don't forget to double check the hardware I2C connection is enabled on your Rasbperry Pi or other single board computer. The Raspberry Pi tutorials linked in the note above cover how to enable the I2C bus.

PyPi Installation

Since the package is hosted on PyPi, installation on systems that support PyPi installation via pip3 (use pip for Python 2) is easy using a command interface and the following commands:

For all users (The user must have sudo privileges):

language:bash
sudo pip3 install sparkfun-qwiic-as6212

For the current user:

language:bash
pip3 install sparkfun-qwiic-as6212

Local Installation

The following instructions cover how to perform a local installation of the Qwiic AS6212 Python package. Make sure to install the setuptools package prior to installing the Qwiic AS6212 Python package.

Use this command for direct installation at the command line (use python for Python 2):

language:bash
python3 setup.py install

Build a package for use with pip3:

language:bash
python setup.py sdist

This command builds and places a subdirectory called "dist". Change to the new subdirectory and install the Qwiic AS6212 package using pip3 with these commands (make sure to fill in the correct version number):

language:bash
pip3 install sparkfun_qwiic_as6212-<version>.targ.gz

Qwiic AS6212 Python Package Operation

For a complete overview of all functions included in Qwiic AS6212 Py, visit ReadtheDocs. You can also review the package's source code.

Upgrading the Qwiic AS6212 Python Package

In case the package is updated in the future, you may need to upgrade it. Use the following commands to upgrade it:

For all users (The user must have sudo privileges):

language:bash
sudo pip3 install --upgrade sparkfun-qwiic-as6212

For the current user:

language:bash
pip3 install --upgrade sparkfun-qwiic-as6212