Hello Embedded Wizard Community,
I am currently working on a project that involves a grid-like template containing squares of different colors. This template is displayed on a page within my project. I would like to capture the hex color value of each square when it is touched by the user, so that the system can take appropriate actions based on the color.
My idea is to retrieve the hex color value of the pixel at the specific coordinate where the user touches the screen. Could you please guide me on how to achieve this in Embedded Wizard?
Here are some specific questions:
Thank you in advance for your assistance. I look forward to your insights.
Hello Burak Cebesoy,
In other words, is there a way to detect the color in the area where the user touches the screen?
that is the difficulty. This application case requires the access to the frame buffer, synchronisation of pending drawing operations and eventual flushing data caches. The implementation depends therefore on the architecture of the particular target system.
Which target system are you using?
Hello Paul Banach and Embedded Wizard Community,
Thank you for your detailed response. I understand that the implementation depends on the architecture of the particular target system. We are using the STM32F767 series for our target system.
I have a couple of follow-up questions:
I assume that I would need to access the framebuffer to retrieve the color value at a specific coordinate. Could you guide me on how to do this on the STM32F767 series?
How can I ensure that the coordinate value I aim to access in the framebuffer is accurate? Is there any synchronization or calibration needed?
Once I have accessed the framebuffer, how can I retrieve the color value at that specific coordinate?
Thank you again for your invaluable assistance. I look forward to your insights.
Best regards, Burak Cebesoy
in your case, you have to get access to the currently visible framebuffer and you have to read the pixel value from the location where the last touch point was detected.
Let me refer to this answer. In this discussion the question was to save the entire framebuffer content - in your case you need to save only one pixel.
Does this help?
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!