Serial.printf

Status
Not open for further replies.

craiglindley

Well-known member
I was looking at the serialEvent library and its example programs and I saw a

Serial.printf("Termination Character %#02X Event fired: %s\n", Event1.rxTermCharacter, Event1.rxBuffer);

statement. When was printf added to the Serial class? I've been including my own version in my sketches for a long time but if it is built in I no longer have to. Is this a Teensduino thing or an Arduino thing.

Thanks
 
"%#02X"

I've always used "%02X"

I think Serial.printf was added by Paul.

For code that might run on AVRs, I also tend to use the "F" macro and snprintf_P and so on to save RAM
 
Status
Not open for further replies.
Back
Top