I am working on a project where I first need to build up the payload as a string then later on convert it to byte when sending the payload. I am having issues with conversion.
Reson why payload build-up is in string is due to the way it generates each single string, "02", "12", "31", "03" and "36" are the result after diffrent methods of calculations.
String lockHexString[5];
lockHexString[0] = "02";
lockHexString[1] = "12";
lockHexString[2] = "31";
lockHexString[3] = "03";
lockHexString[4] = "36"
Now when I have lockHexString, I need convert the lockHexString to byteArray, so It looks like
byte lockByte[5] = {0x02, 0x12, 0x31, 0x03, 0x36};