Hello, my name is Sasha, and im 13
years old. Today i tried to do menu for my arduino nano. When i load it and tried to see position of joysticks(in code X,Y,XT,YT) i saw something stupid. You can see on the video:12 апреля 2023 г. - YouTube i think i have no sram, but why? When i compile the sketches i see that's my sketch take 16% of memory, and 15% sram. Im new in arduino, what it can be?
Because i usually cant use PC i upload my code in arduino by phone, and i writing it in arduino studio
Here's code like hex file that i uploaded in arduino on video:
The program you posted does use a lot of SRAM (mostly for the display) and may be too large for the Arduino you have. Learn starting with small programs, and work upwards.
You asked a good question. That number shows the amount of SRAM used in your fixed variables and messages when not using the "F" macro. That 15% is telling you have 100% - 15& = 85% left. It is impossible to write code for the Arduino without using some SRAM so if your code works the SRAM works. When it gets over 80% you are headed for trouble, depending on the code.
The behavior looks like what happens when you do not correctly clear the OLED before printing. It seems like in your loop(), you never clear the display, so each call to println is just wriitng in the same place.
X:575
Y:897
XT:566
YT:838
XT, YT, X, Y, It takes from 2 joysticks, but it place text things. For me arduino is a new development platform, and i dont know what is can be. I think it can be sram but idk
My joysticks should display information about its x,y,xt,yt on display, but they're displaying something like ck^^`~ or XT:^^^* or Y::::"@ if i try to drag joysticks more it will display Hello Sahsa!(you cant see it on video) or etc.