Is there a way to have serial.print(var, HEX); not strip leading zeros
No. Serial.print() does not do formatted output.
sprintf() does, and you can tell it to include leading 0s, and output in a variety of bases.
Is there a way to have serial.print(var, HEX); not strip leading zeros
No. Serial.print() does not do formatted output.
sprintf() does, and you can tell it to include leading 0s, and output in a variety of bases.