you might want a bit larger char buffer for the largest possible int for whatever compiler you have, plus room for the terminating null byte on C strings.
for printf() you shouldn’t need to customize the linker command - just choose a version of printf in the IDE settings.
I don’t know what SendString() is - perhaps something custom within Arduino’s libraries. I use plain C.
Uhh, what? you want to convert an integer to a string to send it over the uart? A string will get converted to an int, then to binary before going out the urart, why not just send the int?
stevech:
Maybe - but every decent C compiler / IDE library I’ve worked with includes itoa() and friends.
You still won’t find itoa() in documentation for the C standard library.
itoa() and many other functions in popular use are well documented by compiler providers.
Then you should have said to look in the documentation provided with the compiler’s library, NOT in the C standard library. There are many resources that cover the standard library that do NOT cover itoa(), including numerous books and web references. Moreover, the behavior of non-standard functions may vary between different implementations, and if you don’t look at the docs for the specific library you are using, you may introduce bugs. Never mind worrying about portability…
“atoi” is what you’re looking for in terms of a library function, or maybe even so for a manual implementation of atoi. A link for the latter has been posted during this thread.