Hi guys, I'm trying integrate a arduino nano and a 256x64 SSD1322 2.7inch OLED display using the u8g2 library, but when I upload the code to the arduino, this white bar appears on the right side and the zero position is out of the screen. Has anyone had this type of problem and managed to fix it?
If you are not using the current version, check the u8g2.h file (located at Arduino/libraries/U8g2/src/clib/u8g2.h) to verify the following define line is not commented out:
/*
The following macro enables 16 Bit mode.
Without defining this macro all calculations are done with 8 Bit (1 Byte) variables.
Especially on AVR architecture, this will save some space.
If this macro is defined, then U8g2 will switch to 16 Bit mode.
Use 16 Bit mode for any display with more than 240 pixel in one
direction.
*/
#define U8G2_16BIT
You shouldn't even be able so successfully compile for a Nano (atmega328 based) with a full buffer, a 256x64 display needs 2048 bytes of ram, which is all the ram available.
I fixed it by changing some values in the display configuration file named u8x8_d_ssd1322.c. I tried several different values until I found the correct value.