Need help with conversion, please

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* ?

OK, that was weird. So you've solved a big problem and now a little problem remains

You are telling it to put both characters at the same screen coordinates.

      ucg.drawString(3, 232, 0, id);

Try moving the character over according to the loop index, viz:

      ucg.drawString(3 + 10 * i, 232, 0, id);

If the first two arguments are screen X and screen Y, I go check… yes, that should move the characters over 10 pixels each time, here only once but same idea if you were doing more digits. Adjust 10 for yiu circumstances.

a7

Yes.

@phloks could use the print() method instead.

See

https://code.google.com/archive/p/ucglib/wikis/reference.wiki

for details.

a7