📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Please place all UPS 3 Day orders by 11am ET Friday December 13 📬❄️📦
0

tft.readPixel always returns 0
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

tft.readPixel always returns 0

by _philleif on Sat Nov 30, 2019 5:06 pm

Hi! I recently purchased a touchscreen TFT (https://www.adafruit.com/product/2478) and am trying to leverage the readPixel function to read colors at a specific location. eg.

Code: Select all | TOGGLE FULL SIZE
tft.fillScreen(BLACK);
Serial.println(tft.readPixel(0,0),HEX); // writes 0

tft.drawPixel(0,0,WHITE);
Serial.println(tft.readPixel(0,0),HEX); // still writes 0...


The display is wired in the 8-bit configuration and all the demos (gfx and touch) work fine.

I've looked through a few other posts and the consensus is that the driver is out of date, but I don't think that's the case as I'm using the latest version of the library and display? If that is the case, how can I update the driver?

Anyone had and solved this before? I appreciate the help!

UPDATE:

After looking through Adafruit_TFTLCD.cpp, it looks like I need a display with driver ID_932X or ID_7575. I tried "faking" the identifier so that readPixel would work, but this breaks everything else.

Still not sure what to do here... @adafruit, is there another display you sell that's compatible?

-p

_philleif
 
Posts: 1
Joined: Sat Nov 30, 2019 5:02 pm

Please be positive and constructive with your questions and comments.