Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

Make CharLCD work over anything that supports the GPIO interface #6

Merged
merged 1 commit into from
Oct 3, 2012

Conversation

dberlin
Copy link
Contributor

@dberlin dberlin commented Oct 3, 2012

This makes the GPIO be an object passed to the class (defaulting to the old behavior of using RPi.GPIO). This in turn, makes it trivial to support any I2C expander that can present the same interface as RPi.GPIO (which is trivial).

For example, when used with the code at PCA95XX you can hook the LCD up to a PCA9535/PCA9555, and use code like this to have it simply work with the LCD driver without any additional modifications:

from PCA95XX import PCA95XX_GPIO
from Adafruit_CharLCD import Adafruit_CharLCD

bus = PCA95XX_GPIO(0, 0x20, 16)
lcd = Adafruit_CharLCD(8, 9, [10, 11, 12, 13], bus)

ladyada added a commit that referenced this pull request Oct 3, 2012
Make CharLCD work over anything that supports the GPIO interface (such as bus expanders)
@ladyada ladyada merged commit 22c8932 into adafruit:master Oct 3, 2012
@ladyada
Copy link
Member

ladyada commented Oct 3, 2012

nifty!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants