SPI display text problem

I am using an SPI display with Arafruit SSD1306 library. I have uploaded some normal example code. but the problem is the text gets cut. The width is good. but the text gets cut in the height. Help needed..

Hello,

I’m assuming that your display height is 64, and not 32. If so, and you’re using the adafruit ssd1306 library, edit this file:

Specifically this section:

Un-comment the line for 64, and comment the line for 32.

Alternatively, use the SDD1306ASCII library instead if you just want to display text. It’s much more economical on memory. You can find that here:

/*=========================================================================
    SSD1306 Displays
    -----------------------------------------------------------------------
    The driver is used in multiple displays (128x64, 128x32, etc.).
    Select the appropriate display below to create an appropriately
    sized framebuffer, etc.
    SSD1306_128_64  128x64 pixel display
    SSD1306_128_32  128x32 pixel display
    SSD1306_96_16
    -----------------------------------------------------------------------*/
//   #define SSD1306_128_64
   #define SSD1306_128_32
//   #define SSD1306_96_16
/*=========================================================================*/