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

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.1.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.1-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bit_pirate-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 417e6226678ae8b31d688ea099582c2f280512e4945f08425ddcd0c38c86632b
MD5 ab9e467b5fb6020ec550c8b039744bd2
BLAKE2b-256 819a5058e73a79b70d4635934b88f69dae50cd539bfc005d2b005712fd2a7121

See more details on using hashes here.

Provenance

The following attestation bundles were made for bit_pirate-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: bit_pirate-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e76bb4aa2050eeb62e420778ba232b935f79bc660d628eb42b05023e10d2151
MD5 9b2de6af231c257db129466d3ace239c
BLAKE2b-256 f3c1f311a282ace9943b0084438aa22085baa77c803d6f58e7ba8d0850e8e879

See more details on using hashes here.

Provenance

The following attestation bundles were made for bit_pirate-0.1.1-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