I have an SSD1306 OLED that I have connected to a Wemos D1 Mini. It works like a charm, but I was wondering if it was possible to have two lines of code, where one line is static, and the other one scrolls? No example on the web as far as I have tried to find.
I just found the answer on the following site: https://lastminuteengineers.com/oled-display-arduino-tutorial/
Basically, the method
startscroll* on the display takes some arguments.
By passing the proper start page and stope page you can scroll parts of the screen.
Refer to OLED Memory Map for explanation of the pages on the screen. There are eight pages in the display from 0 to 7, so we can scroll a certain part of the screen by passing specific page numbers as parameters.
In this example, we pass both the parameters as 0x00. This will scoll the first page only (first 8 rows) of the display:
// Scroll part of the screen display.setCursor(0,0); display.setTextSize(1); display.println("Scroll"); display.println("some part"); display.println("of the screen."); display.display(); display.startscrollright(0x00, 0x00);