I don’t think so.
You are right, it is not >neccessary< to have much work of reducing size… while i can get a MC with much more memory…
BUT, there is a reason for me, to do it…
(I got already a modified-pico with 328p. (and much more memory)…)
I am a Arduino starter. I have to lern, to do things. I have to lern to code on an effizient way.
I don’t have to, but i want to.
I don’t think, that it is a good way to have 40 times written “lcd.setCursor and lcd.print” in my code only in fact that it is the easiest way. I think reducing binarycode and sketchcode by a function which make it better readable, smaller and reducing size… is a slightly better way…
You are right… much work for less savings, but into that work i’ve lerned how: -to store Strings in EEPROM, in what size relations and savings are posiible, - i now got a function which let me do some better and smaller stuff on 328p with more memory…
With this small and old mc i have to do better coding, because of limited recources. Learning to code efficient at first, i think that is the right way. Then, after lerned howto i easy could do better an much bigger things… because ive lernd how to improve.
Some years ago, i’ve done the same with applicationcoding on PC.
Had already an 486 66Mhz but for coding i used a 8086 4Mhz.
So Applications become very fast and efficient on 486, because the Base of coding mashine was much older and smaller.
Sure, too much work for too less savings.
But if I use this function on an 328p the relation of savings are much higher because of memory size and possiblilities.
if i code the easiest way writing 120x lcd.print on an 328p i would
never lern what to do, if some “good” coding is needed.
Hope, you understand why i do such hard and unneccesary stuff with atmega8. I want to lern efficient coding for using it on better MCs to get better coding and so claimed expanded usage of features.
Size reduced by this function.
That is a proof of itself.
While moves 162 Bytes to EEPROM, i saved 112 Bytes in Flash.
Imagine i got 1K Text on 328p.
Then Flashsaving is 960Bytes… nearly 1K.
I think as result of one implemented very simple function that is efficient saving. (“poor” on atmega8, but usefull for future projects with beter MCs)
For usage in lcd.print and lcd.setcursor things i will use it in future,
because in my opinion that is a better way to do lcd.prints, lcd.setCusror whith half of the Sketchcode and saving nearly the size of eeprom in flash.
So, i will do some code cleaning and think about it now… so i can post it here today… hope time doesn’t run out today… maybe till the next days, you could improve my “Firststeps Noobcode” if you want to