I am working on a school project using Arduino
, I have no past experience with C++
, and I want to generate a unique MAC Address
for every chip. Now I have built a function that creates a two dimensional char
array containing the unique MAC
. And it returns something like this:
// 2D char array example:
char mac[6][2] = {{'A', 'B'}, {'4', 'D'}, {'F', '5'}, {'C', '9'}, {'B', '7'}, {'F', '2'}};
And I want to convert it to something like this:
// Hex array example:
byte mac[6] = {0xAB, 0x4D, 0xF5, 0xC9, 0xB7, 0xF2};
Important Note: Arduino does not support STL
so I need an implementation that does not use it.
How to achieve this result?
This is not a duplicate of this question.