kidoman / embd

Embedded Programming Framework in Go
http://embd.kidoman.io
MIT License
1.28k stars 157 forks source link

controller: add a lib for the HD44780 character display controller #19

Closed matthewdale closed 9 years ago

matthewdale commented 9 years ago

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.

kidoman commented 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!

kidoman commented 9 years ago

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.

matthewdale commented 9 years ago

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?

kidoman commented 9 years ago

Yep, thats what I had in my mind as well :)

@kunalpowar Thoughts?

kidoman commented 9 years ago

@matthewdale Hey, would love to get this merged in...

matthewdale commented 9 years ago

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.

zefer commented 9 years ago

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!

kidoman commented 9 years ago

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.

kidoman commented 9 years ago

Thanks looks good :)