printf

7 views
Skip to first unread message

Reza Naima

unread,
Dec 21, 2010, 7:58:05 PM12/21/10
to rstep
seems printf works just fine, the arudino people just dont want to tell
you about it?!@

see for more details..

http://reza.net/wordpress/?p=269

I'll start migrating the code to use it (for the _644 version at least)

Reza

Alexandre Harvey

unread,
Dec 21, 2010, 8:05:28 PM12/21/10
to rs...@googlegroups.com
That should simplify things a fair bit!

Alex

iklln6

unread,
Dec 21, 2010, 8:11:53 PM12/21/10
to rstep
maybe they were trying to keep with the java motif
System.out.println("...");
System.out.print("...");

Serial.println("...");
Serial.print("...");

... now that i think about it, does adding elements in a print
statement work the same as java? like

int stuff;
System.out.println("The integer 'stuff' = " + stuff);
Serial.println("The integer 'stuff' = " + stuff);

Alexandre Harvey

unread,
Dec 21, 2010, 8:13:15 PM12/21/10
to rs...@googlegroups.com
One question thought, how much bigger is the firmware with printf? My guess is that it uses up a fair bit of space.

Alex

Reza Naima

unread,
Dec 21, 2010, 8:15:06 PM12/21/10
to rs...@googlegroups.com
it works the same way C++ handles it, but i don't think it would.  I think they were trying to keep it simple rather than trying to explain to people how printf() worked.  

-r



iklln6
Tuesday, December 21, 2010 5:11 PM

maybe they were trying to keep with the java motif
System.out.println("...");
System.out.print("...");

Serial.println("...");
Serial.print("...");

... now that i think about it, does adding elements in a print
statement work the same as java? like

int stuff;
System.out.println("The integer 'stuff' = " + stuff);
Serial.println("The integer 'stuff' = " + stuff);
Alexandre Harvey
Tuesday, December 21, 2010 5:05 PM

That should simplify things a fair bit!

Alex




Reza Naima
Tuesday, December 21, 2010 4:58 PM

Reza Naima

unread,
Dec 21, 2010, 8:17:10 PM12/21/10
to rs...@googlegroups.com
about 2k, which is fine for the 644.

-r



Alexandre Harvey
Tuesday, December 21, 2010 5:13 PM

One question thought, how much bigger is the firmware with printf? My guess is that it uses up a fair bit of space.

Alex


iklln6
Tuesday, December 21, 2010 5:11 PM
maybe they were trying to keep with the java motif
System.out.println("...");
System.out.print("...");

Serial.println("...");
Serial.print("...");

... now that i think about it, does adding elements in a print
statement work the same as java? like

int stuff;
System.out.println("The integer 'stuff' = " + stuff);
Serial.println("The integer 'stuff' = " + stuff);
Alexandre Harvey
Tuesday, December 21, 2010 5:05 PM
That should simplify things a fair bit!

Alex


Reza Naima
Tuesday, December 21, 2010 4:58 PM

Alexandre Harvey

unread,
Dec 21, 2010, 8:18:10 PM12/21/10
to rs...@googlegroups.com
Yeah on the 644 it would be fine, but on the 8k (or was it 16k) original it would have been a big issue! That is most likely why they left it out.

Alex
compose-unknown-contact.jpg
postbox-contact.jpg
Reply all
Reply to author
Forward
0 new messages