Catalog PyPI
PACKAGE EXPLORERView in registry

adafruit-circuitpython-bitbangio

PyPI

A library for adding bitbang I2C and SPI to CircuitPython without the built-in bitbangio module

adafruitbitbangbitbangioblinkacircuitpythoni2cmicropythonsoftwarespi
Versions collected1
Direct dependencies2From release 1.3.22
Last observed20 Oct, 18:48 UTC

README

Version 1.3.22 documentation
Introduction
============

.. image:: https://readthedocs.org/projects/adafruit-circuitpython-bitbangio/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/bitbangio/en/latest/
    :alt: Documentation Status

.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
    :target: https://adafru.it/discord
    :alt: Discord

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

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Code Style: Ruff

A library for adding bitbang I2C and SPI to CircuitPython without the built-in bitbangio module.
The interface is intended to be the same as bitbangio and therefore there is no bit order or chip
select functionality. If your board supports bitbangio, it is recommended to use that instead
as the timing should be more reliable.


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

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_.

Installing from PyPI
=====================
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-bitbangio/>`_. To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-bitbangio

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-bitbangio

To install in a virtual environment in your current project:

.. code-block:: shell

    mkdir project-name && cd project-name
    python3 -m venv .venv
    source .venv/bin/activate
    pip3 install adafruit-circuitpython-bitbangio

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

.. code-block:: python

    """
    This example is for demonstrating how to retrieving the
    board ID from a BME280, which is stored in register 0xD0.
    It should return a result of [96]
    """

    import board
    import digitalio
    import adafruit_bitbangio as bitbangio

    # Change these to the actual connections
    SCLK_PIN = board.D6
    MOSI_PIN = board.D17
    MISO_PIN = board.D18
    CS_PIN = board.D5

    cs = digitalio.DigitalInOut(CS_PIN)
    cs.switch_to_output(value=True)

    spi = bitbangio.SPI(SCLK_PIN, MOSI=MOSI_PIN, MISO=MISO_PIN)
    cs.value = 0
    while not spi.try_lock():
        pass
    spi.write([0xD0])
    data = [0x00]
    spi.readinto(data)
    spi.unlock()
    cs.value = 1
    print("Result is {}".format(data))

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

API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/bitbangio/en/latest/>`_.

For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

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

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_BitbangIO/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

Downloads & popularity

46downloads
1-day window · source-reported counts20 Oct 2026
112560
2026-07-23: 7 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-23–2026-07-232026-07-24: 6 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-24–2026-07-242026-07-25: 8 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-25–2026-07-252026-07-26: 12 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-26–2026-07-262026-07-27: 25 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-27–2026-07-272026-07-28: 12 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-28–2026-07-282026-07-29: 5 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-29–2026-07-292026-07-30: 11 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-30–2026-07-302026-07-31: 112 · observed 2026-10-21T08:54:27.9116408Z · period 2026-07-31–2026-07-312026-08-01: 2 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-01–2026-08-012026-08-02: 4 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-02–2026-08-022026-08-03: 10 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-03–2026-08-032026-08-04: 4 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-04–2026-08-042026-08-05: 14 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-05–2026-08-052026-08-06: 6 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-06–2026-08-062026-08-07: 11 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-07–2026-08-072026-08-08: 15 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-08–2026-08-082026-08-09: 49 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-09–2026-08-092026-08-10: 15 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-10–2026-08-102026-08-11: 14 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-11–2026-08-112026-08-12: 15 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-12–2026-08-122026-08-13: 6 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-13–2026-08-132026-08-14: 20 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-14–2026-08-142026-08-15: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-15–2026-08-152026-08-16: 32 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-16–2026-08-162026-08-17: 11 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-17–2026-08-172026-08-18: 3 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-18–2026-08-182026-08-19: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-19–2026-08-192026-08-20: 10 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-20–2026-08-202026-08-21: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-21–2026-08-212026-08-22: 2 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-22–2026-08-222026-08-23: 27 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-23–2026-08-232026-08-24: 41 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-24–2026-08-242026-08-25: 5 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-25–2026-08-252026-08-26: 14 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-26–2026-08-262026-08-27: 7 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-27–2026-08-272026-08-28: 4 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-28–2026-08-282026-08-29: 3 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-29–2026-08-292026-08-30: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-30–2026-08-302026-08-31: 8 · observed 2026-10-21T08:54:27.9116408Z · period 2026-08-31–2026-08-312026-09-01: 2 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-01–2026-09-012026-09-02: 67 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-02–2026-09-022026-09-03: 35 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-03–2026-09-032026-09-04: 4 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-04–2026-09-042026-09-05: 6 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-05–2026-09-052026-09-06: 16 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-06–2026-09-062026-09-07: 19 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-07–2026-09-072026-09-08: 6 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-08–2026-09-082026-09-09: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-09–2026-09-092026-09-10: 5 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-10–2026-09-102026-09-11: 2 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-11–2026-09-112026-09-12: 3 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-12–2026-09-122026-09-13: 13 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-13–2026-09-132026-09-14: 2 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-14–2026-09-142026-09-16: 3 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-16–2026-09-162026-09-17: 1 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-17–2026-09-172026-09-18: 2 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-18–2026-09-182026-09-19: 15 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-19–2026-09-192026-09-20: 8 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-20–2026-09-202026-09-21: 4 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-21–2026-09-212026-09-22: 8 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-22–2026-09-222026-09-23: 15 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-23–2026-09-232026-09-24: 28 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-24–2026-09-242026-09-25: 34 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-25–2026-09-252026-09-26: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-26–2026-09-262026-09-27: 7 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-27–2026-09-272026-09-28: 6 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-28–2026-09-282026-09-29: 58 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-29–2026-09-292026-09-30: 33 · observed 2026-10-21T08:54:27.9116408Z · period 2026-09-30–2026-09-302026-10-01: 6 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-01–2026-10-012026-10-02: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-02–2026-10-022026-10-03: 72 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-03–2026-10-032026-10-04: 9 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-04–2026-10-042026-10-05: 23 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-05–2026-10-052026-10-06: 10 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-06–2026-10-062026-10-07: 7 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-07–2026-10-072026-10-08: 20 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-08–2026-10-082026-10-09: 56 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-09–2026-10-092026-10-10: 20 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-10–2026-10-102026-10-11: 3 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-11–2026-10-112026-10-12: 5 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-12–2026-10-122026-10-13: 5 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-13–2026-10-132026-10-14: 5 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-14–2026-10-142026-10-15: 2 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-15–2026-10-152026-10-16: 14 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-16–2026-10-162026-10-17: 1 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-17–2026-10-172026-10-18: 25 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-18–2026-10-182026-10-19: 12 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-19–2026-10-192026-10-20: 46 · observed 2026-10-21T08:54:27.9116408Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 89 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-20462026-10-21T08:54:27.9116408Z
2026-10-19 – 2026-10-19122026-10-21T08:54:27.9116408Z
2026-10-18 – 2026-10-18252026-10-21T08:54:27.9116408Z
2026-10-17 – 2026-10-1712026-10-21T08:54:27.9116408Z
2026-10-16 – 2026-10-16142026-10-21T08:54:27.9116408Z
2026-10-15 – 2026-10-1522026-10-21T08:54:27.9116408Z
2026-10-14 – 2026-10-1452026-10-21T08:54:27.9116408Z
2026-10-13 – 2026-10-1352026-10-21T08:54:27.9116408Z
2026-10-12 – 2026-10-1252026-10-21T08:54:27.9116408Z
2026-10-11 – 2026-10-1132026-10-21T08:54:27.9116408Z
2026-10-10 – 2026-10-10202026-10-21T08:54:27.9116408Z
2026-10-09 – 2026-10-09562026-10-21T08:54:27.9116408Z
2026-10-08 – 2026-10-08202026-10-21T08:54:27.9116408Z
2026-10-07 – 2026-10-0772026-10-21T08:54:27.9116408Z
2026-10-06 – 2026-10-06102026-10-21T08:54:27.9116408Z
2026-10-05 – 2026-10-05232026-10-21T08:54:27.9116408Z
2026-10-04 – 2026-10-0492026-10-21T08:54:27.9116408Z
2026-10-03 – 2026-10-03722026-10-21T08:54:27.9116408Z
2026-10-02 – 2026-10-0292026-10-21T08:54:27.9116408Z
2026-10-01 – 2026-10-0162026-10-21T08:54:27.9116408Z
2026-09-30 – 2026-09-30332026-10-21T08:54:27.9116408Z
2026-09-29 – 2026-09-29582026-10-21T08:54:27.9116408Z
2026-09-28 – 2026-09-2862026-10-21T08:54:27.9116408Z
2026-09-27 – 2026-09-2772026-10-21T08:54:27.9116408Z
2026-09-26 – 2026-09-2692026-10-21T08:54:27.9116408Z
2026-09-25 – 2026-09-25342026-10-21T08:54:27.9116408Z
2026-09-24 – 2026-09-24282026-10-21T08:54:27.9116408Z
2026-09-23 – 2026-09-23152026-10-21T08:54:27.9116408Z
2026-09-22 – 2026-09-2282026-10-21T08:54:27.9116408Z
2026-09-21 – 2026-09-2142026-10-21T08:54:27.9116408Z
2026-09-20 – 2026-09-2082026-10-21T08:54:27.9116408Z
2026-09-19 – 2026-09-19152026-10-21T08:54:27.9116408Z
2026-09-18 – 2026-09-1822026-10-21T08:54:27.9116408Z
2026-09-17 – 2026-09-1712026-10-21T08:54:27.9116408Z
2026-09-16 – 2026-09-1632026-10-21T08:54:27.9116408Z
2026-09-14 – 2026-09-1422026-10-21T08:54:27.9116408Z
2026-09-13 – 2026-09-13132026-10-21T08:54:27.9116408Z
2026-09-12 – 2026-09-1232026-10-21T08:54:27.9116408Z
2026-09-11 – 2026-09-1122026-10-21T08:54:27.9116408Z
2026-09-10 – 2026-09-1052026-10-21T08:54:27.9116408Z
2026-09-09 – 2026-09-0992026-10-21T08:54:27.9116408Z
2026-09-08 – 2026-09-0862026-10-21T08:54:27.9116408Z
2026-09-07 – 2026-09-07192026-10-21T08:54:27.9116408Z
2026-09-06 – 2026-09-06162026-10-21T08:54:27.9116408Z
2026-09-05 – 2026-09-0562026-10-21T08:54:27.9116408Z
2026-09-04 – 2026-09-0442026-10-21T08:54:27.9116408Z
2026-09-03 – 2026-09-03352026-10-21T08:54:27.9116408Z
2026-09-02 – 2026-09-02672026-10-21T08:54:27.9116408Z
2026-09-01 – 2026-09-0122026-10-21T08:54:27.9116408Z
2026-08-31 – 2026-08-3182026-10-21T08:54:27.9116408Z
2026-08-30 – 2026-08-3092026-10-21T08:54:27.9116408Z
2026-08-29 – 2026-08-2932026-10-21T08:54:27.9116408Z
2026-08-28 – 2026-08-2842026-10-21T08:54:27.9116408Z
2026-08-27 – 2026-08-2772026-10-21T08:54:27.9116408Z
2026-08-26 – 2026-08-26142026-10-21T08:54:27.9116408Z
2026-08-25 – 2026-08-2552026-10-21T08:54:27.9116408Z
2026-08-24 – 2026-08-24412026-10-21T08:54:27.9116408Z
2026-08-23 – 2026-08-23272026-10-21T08:54:27.9116408Z
2026-08-22 – 2026-08-2222026-10-21T08:54:27.9116408Z
2026-08-21 – 2026-08-2192026-10-21T08:54:27.9116408Z
2026-08-20 – 2026-08-20102026-10-21T08:54:27.9116408Z
2026-08-19 – 2026-08-1992026-10-21T08:54:27.9116408Z
2026-08-18 – 2026-08-1832026-10-21T08:54:27.9116408Z
2026-08-17 – 2026-08-17112026-10-21T08:54:27.9116408Z
2026-08-16 – 2026-08-16322026-10-21T08:54:27.9116408Z
2026-08-15 – 2026-08-1592026-10-21T08:54:27.9116408Z
2026-08-14 – 2026-08-14202026-10-21T08:54:27.9116408Z
2026-08-13 – 2026-08-1362026-10-21T08:54:27.9116408Z
2026-08-12 – 2026-08-12152026-10-21T08:54:27.9116408Z
2026-08-11 – 2026-08-11142026-10-21T08:54:27.9116408Z
2026-08-10 – 2026-08-10152026-10-21T08:54:27.9116408Z
2026-08-09 – 2026-08-09492026-10-21T08:54:27.9116408Z
2026-08-08 – 2026-08-08152026-10-21T08:54:27.9116408Z
2026-08-07 – 2026-08-07112026-10-21T08:54:27.9116408Z
2026-08-06 – 2026-08-0662026-10-21T08:54:27.9116408Z
2026-08-05 – 2026-08-05142026-10-21T08:54:27.9116408Z
2026-08-04 – 2026-08-0442026-10-21T08:54:27.9116408Z
2026-08-03 – 2026-08-03102026-10-21T08:54:27.9116408Z
2026-08-02 – 2026-08-0242026-10-21T08:54:27.9116408Z
2026-08-01 – 2026-08-0122026-10-21T08:54:27.9116408Z
2026-07-31 – 2026-07-311122026-10-21T08:54:27.9116408Z
2026-07-30 – 2026-07-30112026-10-21T08:54:27.9116408Z
2026-07-29 – 2026-07-2952026-10-21T08:54:27.9116408Z
2026-07-28 – 2026-07-28122026-10-21T08:54:27.9116408Z
2026-07-27 – 2026-07-27252026-10-21T08:54:27.9116408Z
2026-07-26 – 2026-07-26122026-10-21T08:54:27.9116408Z
2026-07-25 – 2026-07-2582026-10-21T08:54:27.9116408Z
2026-07-24 – 2026-07-2462026-10-21T08:54:27.9116408Z
2026-07-23 – 2026-07-2372026-10-21T08:54:27.9116408Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.3.2223 Apr 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
adafruit/adafruit_circuitpython_bitbangio

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:48 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:26eeea17f352b7d95dcee4de3d95c0e37b01af6e9dc80bd752e697909663a8dd