Closed matthewdale closed 9 years ago
Wow @matthewdale !
Really impressive stuff! Sorry for not having reviewed this thus far. Was really swamped.
I am still going through the code trying to get my head wrapped around the implementation. Will report back here!
Initial thoughts: Would it possible to have the CharacterDisplay work across other similar devices. This feels like a opportunity to have something like Servo which could work on a generic interface.
I think CharacterDisplay could definitely be refactored to use an interface instead of an HD44780 instance directly. I'll have to consider what functions are likely to be common across character display controllers and probably move a few functions from CharacterDisplay into HD44780 and add them to the interface.
Were you thinking something like /embd/interface/display/character_display.go
?
Yep, thats what I had in my mind as well :)
@kunalpowar Thoughts?
@matthewdale Hey, would love to get this merged in...
I've refactored characterdisplay
into a generic wrapper. I had to make a few changes to the hd44780
package to facilitate making a clean interface to the controller.
I just wanted to say a massive thank you @matthewdale for this PR, and @kidoman for embd. I spent a while a looking for a library for outputting to a 16x2 HD44780 over GPIO and it was an absolute breeze with this branch. I love the detail here, too, such as the lcd blink & cursor features. Thank you!
Glad you are liking this. Will be getting this merged in soon
Sent from my iPhone
On 25-Mar-2015, at 10:53 pm, Joe Roberts notifications@github.com wrote:
I just wanted to say a massive thank you @matthewdale for this PR, and @kidoman for embd. I spent a while a looking for a library for outputting to a 16x2 HD44780 over GPIO and it was an absolute breeze with this branch. I love the detail here, too, such as the lcd blink & cursor features. Thank you!
— Reply to this email directly or view it on GitHub.
Thanks looks good :)
The hd44780 package supports HD44780 character display controllers connected by either a 4-bit GPIO bus or an I2C bus.
It also includes a high-level wrapper for easily printing messages.