Skip to main content

Python clients for ESP32 Bit Pirate over USB serial, Wi-Fi, and BPIO2

Project description

Bit Pirate Python

Python clients for controlling ESP32 Bit Pirate through:

  • USB serial CLI
  • Wi-Fi WebSocket CLI
  • BPIO2 binary GPIO, I2C, and SPI adapter mode

Installation

pip install bit-pirate-python

The PyPI distribution is named bit-pirate; the Python import package is bitpirate.

USB serial CLI

from bitpirate import BitPirate

bp = BitPirate.auto_connect()
bp.start()
bp.change_mode("i2c")
bp.send("scan")
bp.wait()
print(bp.receive())
bp.stop()

A specific serial port can also be selected:

from bitpirate import BitPirate

bp = BitPirate("/dev/ttyACM0")

Wi-Fi CLI

from bitpirate import BitPirateWifi

bp = BitPirateWifi("192.168.4.1")
bp.start()
bp.change_mode("uart")
bp.send("read")
print(bp.receive())
bp.stop()

BPIO2

Switch ESP32 Bit Pirate to the BPIO2 USB adapter before opening the port.

from bitpirate.bpio2 import BPIOClient

with BPIOClient("/dev/ttyACM0", timeout=3) as client:
    status = client.status_request()
    print(status)

Protocol helpers are available as BPIOGPIO, BPIOI2C, and BPIOSPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bit_pirate-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bit_pirate-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file bit_pirate-0.1.0.tar.gz.

File metadata

  • Download URL: bit_pirate-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bit_pirate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 64944f159044b4a2f87a48df9176614671f665ad6e366a3ab59bc10a26d5e09b
MD5 2c5e9a8d0b069b65c36a0c9723b463fd
BLAKE2b-256 99cb35fd458c6f0c6040784f9ee3b19a2979290f33eee84d507d07421ebd87e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for bit_pirate-0.1.0.tar.gz:

Publisher: publish.yml on geo-tp/Bit-Pirate-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bit_pirate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bit_pirate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bit_pirate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33cd16be83e82841b733744cb2c2c4cb29395a212302242b64116fae9ddf1bc0
MD5 e3bf71dffc8bc617f564c8bbe6c2bbd7
BLAKE2b-256 1886546ab1b504b81f4f0a5363de1b7cbb001bb0691967a64a2f5f7222efa1a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for bit_pirate-0.1.0-py3-none-any.whl:

Publisher: publish.yml on geo-tp/Bit-Pirate-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page