Closed GoogleCodeExporter closed 9 years ago
Apart from an unmatched parenthesis* in your function call, you're trying to
hand an Arduino library String object to a function that is expecting a C
null-terminated character array.
To do what you want, you could:
1) Use sprintf() to make a null-terminated character array (a real C string).
2) You could not treat what is, after all, a number, as a string, and instead use one of the numerical display functions, such as module.setDisplayToDecNumber().
3) You could use one of the String object's methods to perform a conversion to a null-terminated character array. Have a look at String.toCharArray().
Option 2 will give you the smallest code, as you dodge having to include the
String library, and stdio.h, both of which inflate your code by about 2k.
* Should be module.setDisplayToString(stringFinal), 0xF0);
Original comment by mishg...@gmail.com
on 9 Oct 2011 at 11:43
I'm sorry for the late reply, but I'm working on some other personal issues and
couldn't check this out as regular as I would like. Plus, google code wasn't
notifying me of new issues.
#1 is right: the problem is that you're using a String library and not standard
C char arrays.
I can try to look at this as soon as I have some time - maybe add some support
for the string library.
Original comment by rjbati...@gmail.com
on 11 Oct 2011 at 4:27
Support for String object added and released as version 1.3.0.
Original comment by rjbati...@gmail.com
on 20 Oct 2011 at 12:09
Original issue reported on code.google.com by
edw...@nardella.ca
on 8 Oct 2011 at 4:26