Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gmparis/circuitpython_i2c_button

CircuitPython I2C Button à la Sparkfun Qwiic Button/Switch/Arcade
https://github.com/gmparis/circuitpython_i2c_button

circuitpython i2c-device sparkfun-products

Last synced: 3 months ago
JSON representation

CircuitPython I2C Button à la Sparkfun Qwiic Button/Switch/Arcade

Awesome Lists containing this project

README

        

Introduction
============

.. image:: https://readthedocs.org/projects/circuitpython-i2c_button/badge/?version=latest
:target: https://circuitpython-i2c_button.readthedocs.io/
:alt: Documentation Status

.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://discord.gg/nBQh6qu
:alt: Discord

.. image:: https://github.com/gmparis/CircuitPython_i2c_button/workflows/Build%20CI/badge.svg
:target: https://github.com/gmparis/CircuitPython_i2c_button/actions
:alt: Build Status

CircuitPython I2C Button à la Sparkfun Qwiic Button/Switch/Arcade

Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython `_
* `Bus Device `_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle `_
or individual libraries can be installed using
`circup `_.

Installing to a Connected CircuitPython Device with Circup
==========================================================

Make sure that you have ``circup`` installed in your Python environment.
Install it with the following command if necessary:

.. code-block:: shell

pip3 install circup

With ``circup`` installed and your CircuitPython device connected use the
following command to install:

.. code-block:: shell

circup install i2c_button

Or the following command to update an existing version:

.. code-block:: shell

circup update

Usage Example
=============

.. code-block:: python

import board
import busio
from i2c_button import I2C_Button

i2c = board.I2C()
button = I2C_Button(i2c)
print('firmware version is', button.version)

See examples/i2c_button_simpletest.py and other scripts in that folder
for more extensive examples.

Credits
============

This library is based upon the Sparkfun Arduino library and SparkX Switch firmware
authored by Nathan Seidle, Fischer Moseley and Priyanka Makin.

* `Arduino Library `_
* `Switch Firmware `_

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
`_
before contributing to help this project stay welcoming.

Documentation
=============

For information on building library documentation, please check out `this guide `_.