Can someone explain clearly how to convert a string (like "0xff9933") into a usable integer??? All I really need to do is drop the quotes. I know internally it's more complicated than that, but it can be that complicated.
I'm working on an LED matrix display where the patterns are saved on an SD card. For some dumb reason it seems like this hasn't been done before. At least I can't find it. I have everything mostly worked out except how to turn the hex values (which are saved in txt files) into usable data.
I've been going out of my mind here and spending many hours digging through Arduino and C++ posts. This is driving me nuts. Any help would be greatly appreciated.
Are you treating the result as signed or unsigned? Depending on that answer: strtol() or strtoul() are two possiblities.
EDIT:
You'll need to use c-string functions or array indexing to get rid of the double quotes first. Or perhaps drop them as they're read in from the SD card.