You get 3 errors, none of which are probably what you are trying to do, but all 3 are for the line
static char* toTwoChar(byte b);
Looking at this, I can see this is incorrect syntax for a function pointer, if that is what you are trying to do, but I am not sure what you are trying to do with this line.
Perehama:
You get 3 errors, none of which are probably what you are trying to do, but all 3 are for the line
static char* toTwoChar(byte b);
Looking at this, I can see this is incorrect syntax for a function pointer, if that is what you are trying to do, but I am not sure what you are trying to do with this line.
The method transforms a byte to its string (char*) equivalent. This is not a function pointer but a function returning a char pointer (this is what I want, I would like to do).
PhaustSceptic:
The method transforms a byte to its string (char*) equivalent. This is not a function pointer but a function returning a char pointer (this is what I want, I would like to do).
You want to pass the value of the byte or the address of the byte?
Except memory usage problems or other type of execution problems (I will quickly checks that :D) why the code does not compile ?
I add the static keyword to be able to access the method without the need of instantiate the class. But removing it does not change the compilation error.
The correct filename is Arduino.h. Although you can may (depending on where you use it) get away with arduino.h on a filename case-insensitive OS like Windows, this will not work on a case sensitive OS like Linux. Correct filename case is required for #include directives in Arduino sketches even on Windows. So it's best to always use the proper filenames.