Skip to content

x, y coordinates are flipped compared to FT5336 touch screen and Arduino library #20

Open
@BlitzCityDIY

Description

@BlitzCityDIY

i've been working with the new revision 3.5" TFT breakout that uses this display along with the FT5336 touch screen driver. i've found that the touch screen coordinates and the display coordinates in CircuitPython do not match by default. However, in Arduino they do match.

0, 0 for the FT5336 and Arduino is here:
0-0_ft ard_5846-04

whereas by default in CircuitPython it's here:
0-0_cp

additionally, in arduino the display defaults to 320x480. this matches the incoming x and y values from the FT5336.

as a workaround, i rotated the display by 90 and used flip_y and flip_x in the touchpaint example:

display = HX8357(display_bus, width=320, height=480, rotation=90)
...
tile_grid.flip_y = True
tile_grid.flip_x = True

i'm a little concerned that end users will bump into this and be confused so i'm curious if there is a way to update the library to account for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions