I'm trying to print a specific color to a specific X,Y position to a tft display however i'm running into trouble
I can't seem to convert the incomming hex values to the propper color codes
//Input String Format: XXXYYYFFFF - Data comes through as 010020FFFF as the display only has 320*240 resolution
//Input String Format: XXXYYYFFFF
String xA = inputString.substring(0,3);
String xB = inputString.substring(3,6);
String xC = inputString.substring(6,10);
int x = xA.toInt(); //Converted to int
int y = 320 - xB.toInt(); //Converted to int with inverted rendering to flip the image horizontally due to screen rotation
//Problem code bellow
String color = '0x' + xC; //Example of xC would be FFFF to make the string 0xFFFF
uint16_t col = color.toInt(); //Convert to uint16_t (COLOR): 0xFFFF = White (Not working?)
//Problem code above
//Print the color to the X and Y Vector of the TFT display
tft.drawPixel(x,y,col);
Any help regarding converting string to uint16_t propperly would be very helpful :)