0

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.

1

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);

Source: https://lastminuteengineers.com/oled-display-arduino-tutorial/

| improve this answer | |
  • 1
    Please either explain more about the solution in your answer or delete your question. These Q&A are supposed to serve as knowledgebase and links tend to get broken rather fast, which would make your answer completely useless for others – chrisl Mar 13 at 16:25
  • 1
    @chrisl Updated my post. Thanks for telling me, you are completely right. – rebellion Mar 13 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.