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

Adds class to back support for ST7789 #92

Merged
merged 4 commits into from Jan 8, 2020

Conversation

Gadgetoid
Copy link
Contributor

We're working on an ST7789 breakout garden SPI LCD module, so I've had hardware available for testing.

This draft PR replaces #91 and reflects my approach to implementing this LCD so far, but it has a dependency upon numpy that I'm not entirely comfortable with.

The key issue with this LCD is the 18-bit colour data that needs to be sent- requiring the (hopefully elegant) repacking of 24-bit colour into 18-bits. My familliarity (or lack thereof) with Luma fails me here- is there an established pattern for repacking data that could be used instead?

Among other things it also needs:

  • To default to spi interface, possible?
  • To default to 160x160 and not 128x64

For my own future reference, this has been tested and works in the rear SPI port of BG SPI using the command-line:

python3 example.py --display st7789 --interface spi --gpio-backlight 18 --backlight-active high --width 160 --height 160 --gpio-data-command 9

I can't seem to get it to work on the other SPI port with CE1/BCM7.

@Gadgetoid
Copy link
Contributor Author

Actually our display is 240x240 pixels, so that's two resolutions this should support.

@thijstriemstra
Copy link
Collaborator

The namespace changes in this PR have been changed and fixed since opening this PR.

@rm-hull rm-hull marked this pull request as ready for review January 8, 2020 23:27
Copy link
Owner

@rm-hull rm-hull left a comment

Choose a reason for hiding this comment

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

I'm going to merge this into the feature branch, and get it ship-shape (under the guise of PR #80) so it can then be merged into master. These PRs have been stagnating for far too long (my fault entirely)

@rm-hull rm-hull merged commit 3eb8c40 into rm-hull:feature/st7789 Jan 8, 2020
Gadgetoid added a commit to pimoroni/luma.lcd that referenced this pull request Jun 11, 2020
Co-authored-by: Richard Hull <rm_hull@yahoo.co.uk>
rm-hull added a commit that referenced this pull request Mar 14, 2021
* Documentation

* ST7789 support (#92)

Co-authored-by: Richard Hull <rm_hull@yahoo.co.uk>

* Move from numpy to python for `st7789.display`

* Make `flake` happy

* Add tests for st7789, change implementation to more in line with other displays

* QA remarks

* Contrast test

* Review remarks addressed

* Performance improvement for st7789

Co-authored-by: Richard Hull <rm_hull@yahoo.co.uk>
Co-authored-by: Philip Howard <phil@gadgetoid.com>
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

3 participants