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

Adding End of Line handling and support for 20x4 displays #43

Closed
wants to merge 1 commit into from

Conversation

rainierez
Copy link

I was using this code with a RPi and the MCP230xx without the plate and found a need to update it with support for 20x4 (or any size that runs the HD44780 really) This also helps with some of the odd carriage return things. with more than 2 lines. See my test script for demos

I was using this code with a RPi and the MCP230xx without the plate and found a need to update it with support for 20x4 (or any size that runs the HD44780 really) This also helps with some of the odd carriage return things. with more than 2 lines. See my test script for demos
@rainierez
Copy link
Author

FYI, this was written in such a way that it won't affect any current scripts using this library. You would have to add a new var to the "message" function call to get the new features End of Line features. The 4 line support is automatic.

@rainierez
Copy link
Author

Would it be possible to just spin off this library to a new one that just supports different size displays when used with the MCP230xx chips. Then we can remove the button stuff. and then also make the RGB things optional? Not sure how to make a whole new sub folder request. (new to github)

@@ -257,8 +257,9 @@ def write(self, value, char_mode=False):
# ----------------------------------------------------------------------
# Utility methods

def begin(self, cols, lines):
def begin(self, cols = 16, lines = 2):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This defaults the begin statement to the 16x2 display

@tdicola
Copy link
Contributor

tdicola commented Jul 14, 2014

Thanks for submitting the pull and apologies it wasn't reviewed sooner. I made a few small tweaks to simplify the logic and add some constants for the message truncation parameter values. Just merged in the change, thanks again for submitting!

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