I'm trying to use readPixel, from the MCU_Friend library, on an OpenSmart Uno/ST7793 TFT.
After reading through all the associated library files, my understanding is that I can read the value associated with the colour of a particular pixel at location x, y.
I have two circles shown onscreen, one green, one red. When the screen is touched inside these circles, I can return the x and y co-ordinates, and then I want to read the colour of the pixel at those co-ordinates. However, the same value is always returned, no matter where I touch the screen. The value is (decimal) 49664 while the touchscreen is pressed, and 49154 when not pressed. The x,y co-ordinates are correct when I print them on the serial monitor.
I guess the returned are values from a memory location representing the co-ordinate, but they are always the same. suggesting that I am either reading the wrong co-ordinates, or have misunderstood the readPixel routine.
Can anyone point me in the right direction please?