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.

asked Mar 13, 2020 at 15:49

1 Answer 1

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/

answered Mar 13, 2020 at 16:10
2
  • 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 Commented Mar 13, 2020 at 16:25
  • 1
    @chrisl Updated my post. Thanks for telling me, you are completely right. Commented Mar 13, 2020 at 19:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.