Skip to content
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

ST7735 262K Color 160x128 LCD driver #27

Merged
merged 19 commits into from
Mar 4, 2017
Merged

ST7735 262K Color 160x128 LCD driver #27

merged 19 commits into from
Mar 4, 2017

Conversation

rm-hull
Copy link
Owner

@rm-hull rm-hull commented Feb 28, 2017

Driver complete, but needs tests adding & documentation updating

image

Makes use of the recent 'diff-to-previous' framebuffer so delta's are quite efficient, but full-frame refreshes aren't quick (at least not on a RPi Zero) -- 160x128 RGB pixels is probably getting near to the limit of what python can be made to do.

doc/DS18S20.md Outdated
@@ -0,0 +1,23 @@
Dallas Semiconductors DS18S20 temperature sensor
================================================
Copy link
Collaborator

Choose a reason for hiding this comment

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

temperature sensor, what?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I just copied the docs from the st7735fb repo ... I created a breadboard with this LCD, some switches and a temperature sensor on it. Will tidy it all up when I write up the docs

@@ -6,3 +6,8 @@
class pcd8544(object):
DISPLAYON = 0x0C
DISPLAYOFF = 0x08


class st7735(object):
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we can start using since [version nr here] from now on. I can't find the sphinx link for the directive now but im sure its there. So we can identify when a new class was introduced.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Not sure whether this const's idea is such a good idea, as there are ssd1306 specifics in core. Am in the process of detangling it, so this class is likely to be deleted at some point

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok cool, it's more that I meant to say we could use this directive for any new classes or methods:

.. versionadded:: 3.5


def contrast(self, level):
"""
NOT SUPPORTED
Copy link
Collaborator

Choose a reason for hiding this comment

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

if its not supported it should be safe to pass/ignore/remove this method?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Need to override the default implementation with a pass so it doesn't do anything. The only way to set the contrast for these LCDs is to PWM the backlight... something that the backlight class doesn't do just yet.

doc/DS18S20.md Outdated
Dallas Semiconductors DS18S20 temperature sensor
================================================

Load the one-wire drivers:
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's a one-wire driver?

Copy link
Owner Author

Choose a reason for hiding this comment

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

It's another protocol that just requires a single signal wire that does all the read/write/clocking on a single wire (+ ground). It's supported in the Linux kernel through /sys/bus and there's a good write up on https://en.m.wikipedia.org/wiki/1-Wire

Cant get it working on latest kernel on RPi zero though. Definitely have had it working though...

@rm-hull rm-hull merged commit 2193f59 into master Mar 4, 2017
@rm-hull rm-hull deleted the st7735 branch March 4, 2017 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants