Skip to main content

Python RPI interface to low-level ICs

Project description

PyRPIIC

⚠️ WARNING: This is a very early pre-release. Expect things to break. ⚠️

A [Py]thon 3 addon for [R]aspberry [Pi] that enables [i]nterfacing w/ a variety of low-level board [IC]s.

PyPI

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

-OR- using pipenv:

pipenv install pyrpiic

Install from source:

python3 setup.py install

Modules

Clocks

  • LMK612
  • SI570

EEPROMs

TODO

I2C-GPIO Expanders

TODO

Examples

Clocks (Programmable Oscillators)

from pyrpio.i2c import I2C
from pyrpiic.clock import LMK612

i2c_addr = 0x5A
i2c_bus = I2C('dev/i2c-3')
i2c_bus.open()
clock = LMK612(i2c_bus, i2c_addr)

clock.set_frequency(156_250_000)
freq, regs = clock.get_frequency()
clock.regs2freq(regs)
clock.set_registers(regs)
i2c_bus.close()

Project details


Download files

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

Files for pyrpiic, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size PyRPIIC-0.0.3.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page