Pi Shift Py 0.1.1 | Coderz Repository

PiShiftPy 0.1.1

Last updated:

0 purchases

PiShiftPy 0.1.1 Image
PiShiftPy 0.1.1 Images

Free

Languages

Categories

Add to Cart

Description:

PiShiftPy 0.1.1

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()



Author
Shrikant Patnaik

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.