greiman / SSD1306Ascii

Text only Arduino Library for SSD1306 OLED displays
MIT License
500 stars 122 forks source link

i2c scrolling on 32 line displays #24

Open scargill opened 7 years ago

scargill commented 7 years ago

I'm using your WIRE example of scrolling (i2c) - and it isn't - the numbers count, lines go down then the bottom line gets replaced for the rest of the counts - ie the screen doesn't scroll up.

The only change I made to the example was to change the 64 to 32.... as I have the smaller 32 pixel high displays.....

greiman commented 7 years ago

Scrolling only works with 64 pixel high displays.

Scrolling depends on the fact that the memory in the display controller which is 64 pixels high matches the height of display. In this case I can just set a pointer to scroll.

Scrolling on for a 32 pixel high display requires rewriting the display controller memory. The controller memory is not readable and I don't buffer the data so it is impossible.

  /**
   * @brief Enable or disable scroll mode.
   *
   * @param[in] enable true enable scroll on new line false disable scroll.
   * @note Scroll mode is only supported on 64 pixel high displays.
   *       Using setRow() or setCursor() will be unpredictable in scroll mode.
   *       You must use a font with an integral number of line on
   *       the display.
   */
scargill commented 6 years ago

Thanks - marvellous library - thank you.

d-a-v commented 6 years ago

@scargill check ~#47~ v1.2.1

greiman commented 6 years ago

Scrolling should now work on all displays.