Skip to content

Subclass each display #1

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

Closed
makermelissa opened this issue Mar 17, 2019 · 11 comments · Fixed by #2
Closed

Subclass each display #1

makermelissa opened this issue Mar 17, 2019 · 11 comments · Fixed by #2
Assignees

Comments

@makermelissa
Copy link
Collaborator

As discussed in adafruit/Adafruit_CircuitPython_FeatherWing#4 we should subclass various displays to use displayio that use 95% of the same init code so that it works in a similar manner to the Arduino. One of the main reasons for this is that in its current state, it doesn't work on the 160x80 display.

As a bonus, I would also like to bring in the ST7789 chip as a subclass since it is very similar.

@makermelissa makermelissa self-assigned this Mar 17, 2019
@makermelissa
Copy link
Collaborator Author

makermelissa commented Mar 17, 2019

Here is a list that I have of the displays to subclass:

Display Name Size Driver Family
Mini Color TFT 160x80 ST7735S
1.44" TFT Breakout 128x128 ST7735R
1.8" TFT Display 160x128 ST7735R
1.54" Wide Angle TFT 240x240 ST7789

@tannewt
Copy link
Member

tannewt commented Mar 19, 2019

Why do we need subclasses for each? Is it worth having a separate display breakouts repo to handle display sizing? It would be kinda like the FeatherWing repo.

@makermelissa
Copy link
Collaborator Author

It was suggested by @ladyada in the link I have at the top. It would be to handle the displays listed above plus the ones like mentioned in this comment.
# TODO(tannewt): Add support for Red tabs and non-R chips. https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7735.cpp
If you have a preference for a different way to do it, I'm fine with that.

@ladyada
Copy link
Member

ladyada commented Mar 19, 2019

we def need a subclass for each chip type (ST7735, ST7789...) but i dont think we need a full subclass of each display. that said, we do need to show the init values for each display because the inits do vary...

@makermelissa
Copy link
Collaborator Author

Thanks. That's actually the approach I was taking.

@makermelissa
Copy link
Collaborator Author

I'm making good progress on this. I got the Mini Color TFT finished and tested and plugged in the code for most of the other variants. Need to do some clean up code more, add the ST7789, test when more displays come, and add the black tabs variant.

@makermelissa
Copy link
Collaborator Author

Finished the ST7789 class, but I'm not sure if my ST7789 display is broken since it won't work on Arduino or CP. Just a black screen with a backlight. I tried new wires and a different controller board with the same results. I'll continue playing with it, but it may have to wait until more displays come back in stock.

@makermelissa
Copy link
Collaborator Author

I just noticed a small crack in my screen, so it must have gotten damaged in my move. :( Fortunately some more came back in stock, so now I can finish working on this.

@makermelissa
Copy link
Collaborator Author

Received the 1.44 Inch and 1.8 Inch displays today and now have those tested and working. Also verified that a couple non-Adafruit ST7735 displays that I have are working. I just need to test the ST7789 once that comes in and this should be done.

@makermelissa
Copy link
Collaborator Author

After thinking about it, I think the ST7789 should go in its own repo. Although it's a similar chipset, it really shares no code with the ST7735 and makes more sense to separate it. I'll have Kattni create a repo for that and I'll separate it out.

@siddacious
Copy link
Contributor

I'm looking forward to this :) I have a bunch of the mini tfts that I've been eager to get displayio'd

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 a pull request may close this issue.

4 participants