we are working with Arduino nano, ATmega328P old bootloader
connected with ms5611 pressure captor and HiLetgo 1.3" SSH1106 SPI OLED LCD Display 128x64
we tried some libraries, but only u8g2 and u8x8 are working (no results with adafruit, lcdgfxc, onebitdisplay, ssd1306ascii)
when we use u8g2 with 2 fonts (8 and 18 pixels) and ms5611 library, global memory is nearly full, and the ardunio crash after 1/2 minutes
using u8x8 use a bit less memory but nearly full with buzzers, menus and others features
and we can't rotate 180° with u8x8
searching a smaller library, only with alphanumeric characters, but not found
sorry for me english
You can burn the "modern" Nano Bootloader onto your Nano with an external programmer.
You get the same amount of Flash memory but the Upload will be faster (115200 baud)
You can burn the "Uno" bootloader onto the Nano board
Then your Nano will have an extra
3000 1536 bytes of Flash memory for your sketches.
And it will upload at 115200 baud.
You tell the IDE that you have a Uno board.
Edit. Corrected my erroneous message about changing bootloaders.
Thanks to david_2018 for pointing this out.
I agree with david_2018. Any instability is down to insufficient SRAM memory.
Follow the usual advice: Put anonymous strings from print() messages into Flash with F()
You can burn the "modern" Bootloader onto your Nano with an external programmer.
Then your Nano will have an extra 3000 bytes of Flash memory for your sketches.
Old and new bootloaders for the Nano allocate the same amount of flash memory, 2K bytes, unless you modify the boards.txt file. Easier method is to tell the IDE you are burning the bootloader to an UNO, then set the board type to UNO when programming the board, that will only allocate 512 bytes of flash memory for the bootloader.
Sounds like the OP's problem is with the RAM / dynamic memory, if it were using too much flash memory the IDE would not even load the sketch to the Nano. Using a page buffer instead of a full buffer will help a lot with the memory usage for the display. A lot of memory can also be saved by using the F() macro for text literals. Avoid any use of String when short on memory.
There is a u8x8.setFlipMode() function to rotate the display 180 degrees, but there is a note in the example that it does not work with all displays.
thanks to all
i will try and return
trying u8x8.setFlipMode(1), working, sorry for this noob problem
burning bootloader, hum, i need more practice to do that
trying F() function
a gain of 14 bytes of global variable memory but loosing 8 bytes of programs memory
i will check my script, line by line (1000) to save some bits
thanks to all David
This topic was automatically closed after 67 days. New replies are no longer allowed.