nano ATmega168 out of memory VS ATmega328

purchased this piece of crap ATmega168 by mistake over the ATmega328. why they bother making these for less then 50c price difference is beyond me.

anyway so most of my sketches don’t fit, and it does not seem to be the main code, more like the library or something?

is there a way to see what each part of the code is taking up in space and where (ram of eprom), to work on size minimizing?

like for example

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>’

what is uploaded and how big?


Graphics probably reserves a large frame buffer, and/or a large bitmap for characters.

This is just a snippet of the full answer. (Hint)

probably" ? ok ? but that does not answer any of my questions. "

This is just a snippet of the full answer. (Hint)? is this a game or something?

I would say there is no simple way of determining what space a particular library will consume, because you may choose not to use parts of the library in a given sketch, and so those parts will not be linked in to the finished code.