Registry / serialization / binho-host-adapter

binho-host-adapter

JSON →
library0.1.6pypypi✓ verified 83d ago

Python library for controlling Binho multi-protocol USB host adapters (I2C, SPI, UART, GPIO, etc.). Current version 0.1.6. Release cadence: sporadic.

pip install binho-host-adapter
INSTALL
IMPORT
SIG · BINHO-HOST-ADAPTER
B
binho-host-adapter
serializationpythonv0.1.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

name
from binhoHostAdapter import name
from binho import BinhoHostAdapter

Initialize adapter, set I2C mode, write/read bytes.

from binho import BinhoHostAdapter from binho.defines import BINHO_I2C adapter = BinhoHostAdapter() adapter.open() adapter.setOperationMode(BINHO_I2C) adapter.i2c.setBitRate(400000) adapter.i2c.begin() # Write to device 0x50 adapter.i2c.write(0x50, [0x00, 0x01]) # Read 2 bytes data = adapter.i2c.read(0x50, 2) print(data) adapter.close()
Debug
Known issues
gotchaAdapter must be opened before any operation. Forgetting `adapter.open()` causes `AttributeError` or silent failures.
fix
Always call `adapter.open()` after instantiation.
affects: all
gotchaThe library uses `pyserial` for serial communication. On Windows, missing or misconfigured serial drivers can cause `SerialException`. Ensure proper FTDI drivers are installed.
fix
Install FTDI VCP drivers from ftdichip.com.
affects: all
deprecatedOlder examples use `adapter.i2c_write()` method which was replaced by `adapter.i2c.write()`. The old method may be removed.
fix
Use the new I2C object methods: `adapter.i2c.write()`, `adapter.i2c.read()`.
affects: <0.1.6
Upgrade
Version history
0.1.6latest on PyPI · released Jun 4, 2020
Audit
Dependencies
pyserialrequiredUSB/serial communication with the adapter
hidapioptionalHID communication for some adapter models
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
binho-host-adapter — pip install binho-host-adapter · libregistry