I have this snippet of code:
(please disregard the fact that the code is not completely correct, in this form it will print in the same place..)
uint8_t ids[] = {(uint8_t)(menuid >> 4), (uint8_t)(menuid & 0xF)};
for(int i = 0; i < 2; i++) {
uint8_t id = ids[i];
ucg.drawString(3,232,0,id);
}
where menuid is a hex number (i.e 0x11).
This hex number is then split into two integers, that I need to print to a TFT screen.
I'm getting the error:
Compilation error: invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'const char*' [-fpermissive]
The drawString function requires the text to be printed to be of type const char*.
I have tried many things, like casting an int to a string, but I simply cannot get it to work properly.
So my question is: how do I properly convert the int into a const char* ?