Raspberry Pi Shift Register Library
This is a simple(not very optimised) library to use Shift registers on a raspberry pi.
All pin numbers are based on the GPIO.BCM numbering scheme.
All Values are automatically reversed when using the write function.
You will also need the RPi.GPIO module available.
Basic Usage
Connect the Data pin to GPIO 18, the Clock pin to GPIO 23 and the Latch to GPIO 24.
import PiShiftPy as shift
shift.init()
shift.writeAll(0x00) # Will write 0000 0000
shift.write(0xFF) # Will write 1111 1111
Advanced Usage
Writing values
import PiShiftPy as shift
shift.init(17, 27, 22, 2) # Initialize with DataPin = GPIO17, Clock=GPIO27, Latch=GPIO22 with 2 chained registers
shift.writeAll(0xFFFF) # Will write 0000 0000 0000 0000
shift.writeAll(0xFFFF) # Will write 1111 1111 1111 1111
Writing individual Pins
import PiShiftPy as shift
shift.init(17, 27, 22, 1) # Initialize with DataPin = GPIO17, Clock=GPIO27, Latch=GPIO22 with 1 register
shift.push_bit(0)
shift.push_bit(1)
shift.push_bit(0)
shift.push_bit(1)
shift.push_bit(1)
shift.push_bit(1)
shift.push_bit(0)
shift.push_bit(1)
shift.write_latch()
Metadata
Release files for PiShiftPy 0.1.1
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 | Actions |
|---|---|---|---|---|
| PiShiftPy-0.1.1.tar.gz | 3.1 kB | Without provenance | Details for PiShiftPy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| PiShiftPy-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for PiShiftPy-0.1.1-py2.py3-none-any.whl |
Total release size: 7.1 kB
Release files / PiShiftPy-0.1.1.tar.gz
| Download URL | PiShiftPy-0.1.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4a5a2f186d4fffc3bb0cf1275fe3f95e15063c674317111cced04f788a5a68a
|
|
BLAKE2b-256 checksum How to use checksums |
7fe314dd97b207bbddd8fd8f91eb1cfa94a3117f1ae4e92cc13aef9d8e98e329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PiShiftPy-0.1.1-py2.py3-none-any.whl
| Download URL | PiShiftPy-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
52290f1947344d0010798894721cb915e269aacac4f05c959e000c35bfdf24f4
|
|
BLAKE2b-256 checksum How to use checksums |
8dbcaaada99c2f5e4818b83a245362bb43dd873d0b6968fac37c547d64386c24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for PiShiftPy 0.1.1
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.