Converting int to HEX

Hey guys,

If I have a few integers, how would I go about converting them to hex numbers?

For example, decimal 144 would result in 0x90

145 would = 0x91 etc

EDIT: Nevermind, it turns out that for my application, I am fine just writing 144 as an int, and when it's printed to serial it's automatically converted.

Cheers,
Dan

Hex and decimal are just two different interpretations of the same thing, so on the one hand, no conversion is necessary, although Serial.print() can display integers in several formats.

int myInt;
myInt = 42;
Serial.println(myInt, DEC);
Serial.println(myInt, HEX);
Serial.println(myInt, BIN);

Similar thread that may be useful: http://arduino.cc/forum/index.php/topic,66938.0.html

Yess..you can use Serail.println() as shown below:
Serial.println(variable name, HEX);