problem for using Adafruit_SH1106library in ardunio uno

hi
i have problem for using Adafruit_SH1106 library in ardunio uno board

afther verify example Adafruit_SH1106i2c sketch or all sketch show this error

Sketch uses 17360 bytes (53%) of program storage space. Maximum is 32256 bytes.
Global variables use 1565 bytes (76%) of dynamic memory, leaving 483 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.

please help me :frowning:

Adafruit_SH1106 library

my_sketch.ino (43.8 KB)

That is not an error, it is a warning of possible problems

please help me

Start by posting your code

hello i added my sketch to frist post

i have some problem afther chenge board to ardunio mega 2560 in IDE and verify my sketch i have this error

exit status 1
'sleep_bod_disable' was not declared in this scope

When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button. In a message here, click the code tags button (</> on the forum toolbar) and then paste the error. If the text exceeds the forum's 9000 character limit, save it to a text file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

hi added the my code

my code.txt (43.9 KB)

Please post the full error output, as I requested in my last reply.

pert:
Please post the full error output, as I requested in my last reply.

OK ADDED THE FULL LOG VIA TEXT FILE
this problem only for selected ardunio uno board in ide
i chenged oled display mudle to ssd1306(0.96 SSD1306 oled i2c display) in sketch and problem fixed
this error only I used SH1106 library driver(1.3 SH1106 oled i2c display) to sketch

LOG.txt (77.3 KB)

There don't seem to be any errors in that log that you posted

The only thing of note is the last line

Sketch uses 28762 bytes (89%) of program storage space. Maximum is 32256 bytes.
Global variables use 1593 bytes (77%) of dynamic memory, leaving 455 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.

Well, why do I get Low memory alert after using library of SH1106 (selected arduino uno board)?

hamedrepublic:
Well, why do I get Low memory alert after using library of SH1106 (selected arduino uno board)?

Because the Uno has less memory than a Mega

UKHeliBob:
Because the Uno has less memory than a Mega

So why, when I selected uno board in ide and use the Adafruit_SSD1306.h(0.96 oled i2c) library to my sketch, a low memory warning is solved?
this is log for after use Adafruit_SSD1306 to sketch

Sketch uses 30668 bytes (95%) of program storage space. Maximum is 32256 bytes.
Global variables use 579 bytes (28%) of dynamic memory, leaving 1469 bytes for local variables. Maximum is 2048 bytes.

Different library, different amount of memory used. Why does that surprise you ?

UKHeliBob:
Different library, different amount of memory used. Why does that surprise you ?

i tested Adafruit_SH1106 example and egain show

Global variables use 1565 bytes (76%) of dynamic memory, leaving 483 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.

It seems that the Adafruit_SH1106 library has difficulty with my uno board
Because my memory is not full (76% of dynamic memory)

If this is such a concern for you, buy a Mega.