PyRPIIC
A [Py]thon 3 addon for [R]aspberry [Pi] that enables [i]nterfacing w/ a variety of low-level board [IC]s.
Compatibility
- Raspberry Pi Models: A, B (revisions 1.0 and 2.0), A+, B+, 2, 3, 3+, 3 A+, 4, Compute Module 3, Zero.
- Python 3.7+
Install
Install the latest from PyPi:
pip install pyrpiic
Modules
Clocks
- LMK612
- SI570
EEPROMs
- Generic
- M24C02
I2C-GPIO Expanders
- TCA6416A
Sensors
- LDC1412
- LDC1414
- LDC1612
- LDC1614
Examples
Clocks (Programmable Oscillators)
from pyrpio.i2c import I2C
from pyrpiic.clock.lmk61e2 import LMK61E2
# Create and open I2C-3 bus
i2c3 = I2C('/dev/i2c-3')
i2c3.open()
# Create clock
clock = LMK61E2(i2c3, 0x5A)
# Perform various clock operations
clock.set_frequency(156_250_000)
freq, regs = clock.get_frequency()
clock.regs2freq(regs)
clock.set_registers(regs)
# Close I2C-3 bus
i2c3.close()
I2C-GPIO Expander Example
from pyrpio.i2c import I2C
from pyrpiic.ioexpander.tca6416a import TCA6416A
# Create and open I2C-3 bus
i2c3 = I2C('/dev/i2c-3')
i2c3.open()
# Create gpio expander
gpio_exp = TCA6416A(i2c3, 0x21)
# Set GPIO P00 as output pulled high
gpio_exp.set_gpio_direction('P00', 'OUT')
gpio_exp.set_gpio_output('P00', high=True)
# Set GPIO P01 as input w/ flipped polarity and read value
gpio_exp.set_gpio_direction('P01', 'IN')
gpio_exp.set_gpio_polarity('P01', flipped=True)
gpio_exp.get_gpio_input('P01')
# Close I2C-3 bus
i2c3.close()
Metadata
Release files for PyRPIIC 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| PyRPIIC-1.4.0.tar.gz | 20.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| PyRPIIC-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.4 kB
Release files / PyRPIIC-1.4.0.tar.gz
| Download URL | PyRPIIC-1.4.0.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4760abf159e4cc37e6a000d9cbc2a722df2c47d87dc66e19bd732d4a6dffe76
|
|
BLAKE2b-256 checksum How to use checksums |
4f07b824ddcb39e2d4f1015a9045c68259588e47abb91f3e4984db1f75adfb6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.8.11 Linux/5.4.92-flatcar
|
Release files / PyRPIIC-1.4.0-py3-none-any.whl
| Download URL | PyRPIIC-1.4.0-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
610e3626226dd44014e36761f40573a08c872fa96ae5dee88440ad738bbd06d2
|
|
BLAKE2b-256 checksum How to use checksums |
949dd4513024331a373d1b3ab6b08dff25c776c44ba1c11c3624f1662df31784
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.8.11 Linux/5.4.92-flatcar
|
Security for PyRPIIC 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.