Skip to main content

SN74HC164 shift register library for Raspberry Pi

Project description

shiftRegister

Python library for interacting with SN74HC164 and SN54HC164 shift registers on a Raspberry Pi.

Datasheet

Prerequisites

This library relys on pigpio, both pigpiod and the pigpio python module must be installed on your Pi.

On Raspbian:

sudo apt-get update
sudo apt-get install pigpio python-pigpio python3-pigpio

Installing

pip install shift-register

Usage

import pigpio
from shiftregister import ShiftRegister

pi = pigpio.pi()

a_pin = 19
b_pin = 26
clr_pin = 20
clk_pin = 21

sr = ShiftRegister(pi, a_pin, b_pin, clr_pin, clk_pin)

sr.update(0b10101010) # Register outputs 10101010

sr.clear() # Register outputs 00000000

sr.toggle(0) # Register outputs 00000001

sr.toggle(7) # Register outputs 10000001

sr.write(7, 0) # Register outputs 00000001

sr.write(4, 1) # Register outputs 00010001

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shift_register-0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file shift_register-0.1-py3-none-any.whl.

File metadata

  • Download URL: shift_register-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for shift_register-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f94ec67526ff2e7ab2ae7ce1d433ece41f296ca01cbcabd8cde38b1f3cd53c35
MD5 588311112545ec38aaea5c44eefe4f96
BLAKE2b-256 1abbdf2b1fd923e19f8015c144cf0648ed266928971824061c2cc2a32f8ba4e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page