Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pimoroni/circuitpython_adapter
A CircuitPython translation layer
https://github.com/pimoroni/circuitpython_adapter
circuitpython i2c python smbus
Last synced: about 1 month ago
JSON representation
A CircuitPython translation layer
- Host: GitHub
- URL: https://github.com/pimoroni/circuitpython_adapter
- Owner: pimoroni
- License: mit
- Created: 2019-08-16T14:16:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-09T20:59:51.000Z (about 4 years ago)
- Last Synced: 2024-05-17T00:07:03.536Z (7 months ago)
- Topics: circuitpython, i2c, python, smbus
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 5
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CircuitPython Adapter
This library aims to provide a translation layer from SMBus calls to CircuitPython i2c calls, to allow pre-existing code to run on CircuitPython with little to no modifications.
## Currently implements:
* `write_i2c_block_data`
* `read_i2c_block_data`
* `readfrom_mem`# Example
Original Code:
```python
from smbus import SMBus
i2c_bus = SMBus(1)
```Using CircuitPython Adapter:
```python
from pimoroni_circuitpython_adapter import not_SMBus as SMBus
i2c_bus = SMBus(1)
```