Go Down

Topic: Estimating sketch size (Read 940 times) previous topic - next topic

JackBeanie

Hi, is there any way to estimate the size of a program before writing it?

PaulS

Quote
Hi, is there any way to estimate the size of a program before writing it?

Only in the vaguest possible terms, like small, humongous, and "won't fit".

Now, with some idea what hardware you are interfacing with, and the requirements for the application, then the estimate can be made a bit more accurate.

WillR

If you are working with large arrays and so on -- yes -- to that extent.

Otherwise you have to do what I do -- I compile the code before I write it. That way I don't have to guess.
Just another Hacker

robtillaart

Quote
Hi, is there any way to estimate the size of a program before writing it?

1) experience^2 is needed
2) if you use libraries with known size helps a lot
3) usage of floating point adds approx 3-4K to your code. (is also a lib)
4) the complexity of the algorithms needed
5) the amount of storage (including temporary) needed
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up