How can I pass the MAC address to Ethernet shield with leading zeroes?
I change the default MAC address from DEADBEEFFEED
to something like DEADBEEFFE01
. So I only change the last number from 0xED
to 0x01
. My board is communicating to a separate server and when I look at the MAC in that server, my board is listed as DEADBEEFFE1
.
It's not as simple as printing the MAC address with padded zeroes as the board is actually removing it.
I've looked at the Ethernet library and I saw that the mac is passed as an array of uint8_t
. I think that's why, the last number is read as 1 (which is correct) but passed as just that.
Is there a way for the MAC to pass leading zeroes?