I have a microcontroller and I am sampling the values of an LM335 temperature sensor. The LCD library that I have allows me to display the hexadecimal value sampled by the 10-bit ADC. 10bit ADC gives me values from 0x0000 to 0x03FF.
What I am having trouble is trying to convert the hexadecimal value to a format that can be understood by regular humans.
Any leads would be greatly appreciated, since I am completely lost on the issue.
You could create a "string" into which you construct the decimal number like this (constants depend on what size the value actually, I presume 0-255, whether You want it to be null-terminated, etc.):