printf - bug (missing output device?) or "feature" to promote String class?

There are many ways to work around the lack of printf() support in Arduino.
You can even use some clever macros to create functions that will automagically use the
AVR progmem kludge to avoid extra RAM use.
Or you can add printf() support to the Print class, which is what I prefer since it allows using printf
formatting on any device that uses the Print class.
i.e. Serial.printf(), lcd.printf(), etc...

I added details to the Arduino Printf page for how to get xxprintf() support with Arduino
and how to modify your Print class for this.
http://playground.arduino.cc/Main/Printf

When you modify your Print class for printf() it will also automagically support the F() macro
so printf() format strings will not use up extra RAM on the AVR processor.

Attached is another example of what can be done with macros, if you don't want to modify
your Print class.

--- bill

serialprintf.zip (781 Bytes)