If you mean you wish to
display an integer as a series of hex bytes, then you just need to use the
%x
or
%X
format specification[
^] in a
printf()
[
^] statement.
[edit]
That's fine then you just use a cast such as
byte b = (byte)integerValue;
However for integer values greater than 255, you need to split the integer thus:
for (int i = 3; i >= 0; ++i)
{
byte b = (integervalue >> 8 * i) & 0xFF;
send(b);
}
[/edit]