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

ESPHome screen on templates might be wrong #40

Open
yeyeto2788 opened this issue Nov 3, 2023 · 11 comments
Open

ESPHome screen on templates might be wrong #40

yeyeto2788 opened this issue Nov 3, 2023 · 11 comments

Comments

@yeyeto2788
Copy link
Contributor

Hey! Thanks for sharing this.

I have tested the ESPHome templates and there seems to be an error on the display used. I changed the model to be ILI9342 as the ILI9341 did not work on my board (flickering a lot and not complete fill of the screen).

I also noticed that even when changing the model the color order instead of RGB the ILI9342 seems to be BGR.

Let me know if this is something you'll want me to add in the templates.
Cheers.

@witnessmenow
Copy link
Owner

Do you have the cyd with two USB ports by any chance?

@jonnybergdahl is the person who contributed this example, so maybe he has some input

@yeyeto2788
Copy link
Contributor Author

Yes, I do. One is USB type C and the other is USB micro B (I think). Want me to share a picture of the board? Is there a way to check the hardware connected to the board?

BTW, I have a template combining most of the examples into one single template, is that something you'll want me to create a PR with?

@witnessmenow
Copy link
Owner

Yes it seems to be a slightly different revision, I'm unclear what the connection is to the original cyd if it's a knockoff or a new version, but it's display is definitely a little different. So I'd imagine the existing config works for the single micro USB CYD, but your config is needed for this two USB version.

You'll have to excuse my ignorance, but I really know nothing about esphome yet so it's I don't have any opinion on combing the template

What are the advantages of it?

@witnessmenow
Copy link
Owner

Raised #41 for a wider discussion around this type of CYD

@yeyeto2788
Copy link
Contributor Author

The advantage of having a complete template is that you can test various features (LDR, web server, RGB, display, etc) by compiling a single template.

I'm not an expert either BTW I just tested it 😛

@yeyeto2788
Copy link
Contributor Author

I have created a PR with the template just in case you may want to add it into the repo #42

@yeyeto2788
Copy link
Contributor Author

Taking a closer look at the board I noticed another difference, my board does not come with an external flash memory chip (unpopulated on the board)

@Grey-Lancaster
Copy link

Just got one (CYD) esphome ili9342 does work better 9341 did not fill the screen and flickerd, Only done hello world so far but ready to expand !

@Grey-Lancaster
Copy link

Any idea why image is just using 2 colors?

image:
  - file: http://192.168.1.50:8123/local/dad2.PNG
    id: my_image
    resize: 120x120
    type: RGBA
display:
  - platform: ili9xxx
    model: ili9342
    spi_id: tft
    cs_pin: GPIO15
    dc_pin: GPIO2
    rotation: 90
    color_order: RGB

@yeyeto2788
Copy link
Contributor Author

@Grey-Lancaster try setting the color_order to GRB as the ILI9342 seems to have the color order inverted. I have never used that property but if it is helpful this is what I'm currently using:

display:
  - platform: ili9xxx
    id: esp_display
    model: ILI9342
    spi_id: spi_tft
    cs_pin: GPIO15
    dc_pin: GPIO2
    rotation: 270

@Grey-Lancaster
Copy link

Thanks, this works for me "basically" for text, but images are bland. Actually I think the contrast may be too high ?

display:
  - platform: ili9xxx
    model: ili9342
    spi_id: tft
    cs_pin: GPIO15
    dc_pin: GPIO2
    rotation: 270
    color_order: RGB
    id: "my_display" 

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

No branches or pull requests

3 participants