Converting value to decimal

I am looking for a simple function that takes the Uint16_t value and converts it into ASCII value into Decimal value.

if you want to print it, just go ahead and use print()
otherwise itoa() or snprintf() for example
or because the value is at max 5 digits, you can almost do that manually

is There simple code in C to convert this function.. Means Which take ASCII value and convert into DEC value/HEX to print

for going the other direction (ASCII cString to number) you can use sscanf(), atoi(), strtol or strtoul (if you want unsigned), ....

but if it's to just print and you have the string, why don't you print it directly...

As @J-M-L already stated the Serial.print function used in Arduino sketches is already capable to handle lots of different types.

If you are in need of a conversion for any other reason you may check these links:

https://circuits4you.com/2018/03/09/how-to-convert-int-to-string-on-arduino/

For a lot of conversions you can use the String() object:

https://www.arduino.cc/reference/en/language/variables/data-types/stringobject/

Think we still do not have any clue what the conversions shall be good for, do we? :wink: Just for printing it does not make much sense ...