-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2C IO Expander for HD44780 #3
Comments
I generally favor composable components. I see that the current hd44780 New() function takes 6 pins as input; https://pkg.go.dev/periph.io/x/devices/v3/hd44780#New If you were to use a IO expander, I would expect it to expose gpio.Pin pins. Something like what https://pkg.go.dev/periph.io/x/devices/[email protected]/rainbowhat#Dev.GetBuzzer does but in a more ergonomic and generic way. Then the caller could:
Does this make sense? |
That makes sense, that's about what I was thinking of with
I'll start working on an implementation right away |
What change in conn/i2c did you have in mind specifically? I don't see such need. |
To expose GPIOs over I2C. I've been running into some problems with the implementation. |
Ah you mean parallel gpios. That's something I wanted to do for a long time but I think it belongs to conn/gpio. This is not I²C specific. For example one can read 32 GPIOs at once in https://pkg.go.dev/periph.io/x/host/v3/bcm283x#PinsRead0To31. |
Along the same lines, I opened this issue. #17 Direct Register Access for MCP23xxx |
This parallel gpios can be an interface in type Reader32 interface {
Read0To31() uin32
}
... does this make sense? |
What would be the best way to go about implementing a driver for the hd44780 in 4/8 bit mode over an 8-bit I2C IO Expander like the PCF8574T as done for arduino in this project, for Raspberry pi, and in go here with gobot, and standalone here and here?
After reviewing the Project Design and Guidelines, it's not completly clear to me what the intended way to do this is.
Some ways I can think of would be:
Currently, I'm using gobot to drive my LCD, though this adds redundancy as both periph and gobot are packages for the same or at least similar purposes and i would like to keep my dependencies to a minimum to keep a small overhead in my project.
The text was updated successfully, but these errors were encountered: