Close

1kB Software optimization

A project log for DIY Body Scale

Fixing a broken scale with DIY hardware

benjaminBenjamin 11/23/2016 at 15:010 Comments

For the Hackaday 1kB Project I had to optimize the software quite a bit. The "original" test software to test all together had the size of 2.2kB. Not bad (the Atmega8 has 8kB in total) but not good enough for the 1kB Project.

With some general optimizations I got 2.17kB. Still way to heavy. I've used theconvenient "sprintf" function to generate aString consisting of a static string and a long number for displaying on the display. A big error as I now discover. I changed it to a combination of using the display memory and the "iota" function and came to 850Byte! Perfect!

Discussions