I'm fiddling around with a set of i2c addresses from a file. The i2c addresses are all unsigned chars and looks like '0x20' or '0x27'.
The problem is when reading from the file i get an array of char, and i cant figure out how to convert the char[] "0x21" to the unsigned char '0x21'.
is there something similar to printf("0x%02x", address[i]);
but works in the other direction?