sketch has become t...
 
Notifications
Clear all

sketch has become too big for Arduino uno

6 Posts
2 Users
0 Likes
2,406 Views
(@alexander-somers)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  

Hi Wotever,

since one of your latest releaes, I cannot pinpoint which, I hvae a problem with the sketch size. It does no longer fit the arduino nano. I had the oled and 4 W2818B leds included. Before I could fit them on the nano, now the total size exceeds the maximum of 30720. it is 32314.

The biggest issue is that SIMHUB itself does not recognize the big file and tries to upload. I have had 4 arduino's in total now that are no longer able to connect after this happened. I openen in the arduino editor and loaded a small sketch but still I get error's line not in sync etc.

Can you please help? I tried to remove some code from the sketch but I guess it was too much because after uploading simhub no longer recognizes the arduino, eventhough the sketch is on there. Please check again in the code to make sure the sketch stays small for longer period!

thanks!

Alex Somers


   
Quote
(@admin5435)
Prominent Member Admin
Joined: 7 years ago
Posts: 728
 

Hi ! I will take a look ! I replaced the Adafruit library with a better compatibility one but it looks it consumes a bit more, since the oled library consumes a lot by itself indeed it doesn't fit anymore, I will look if I can strip enough to get back leds + oled working at the same time.


   
ReplyQuote
(@alexander-somers)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  

can you also please see if SIMHUB can handle the too big sketches better? it seem to have binned 4 of my arduino's. You can test it yourself if you want. I'm done with waisting mine now 😉 

I did not know it was possible to overload an arduino and brick it that way.


   
ReplyQuote
(@alexander-somers)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  

in the meantime I have removed the custom part from the sketch to save some space, now it uploads onto a fresh nano.

commenting out below mentioned was the trick. if I removed the whole loop SIMHUB would no longer recognize the nano.

//else if (loop_opt == 'P') Command_CustomProtocolData();


   
ReplyQuote
(@alexander-somers)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  

Hi Wotever,

sketch is still too big, even after your last release. 104% of space is used.


   
ReplyQuote
(@admin5435)
Prominent Member Admin
Joined: 7 years ago
Posts: 728
 

Hi !

Thant's strange, with the new option enabled I get 29 826 bytes (97%) for 16 leds + oled

 

This is the new option :


   
ReplyQuote
Share: