This allows you to specify some text, the line to display it on and the speed to scroll it at.
Sample code by Nathan (modified by me to remove the scrollString function as it's now in the library).
/*
Scrolling demo on the OLED 1602 display from Wide.HK.
Uses Library by Phil Grant http://www.gadjet.co.uk
Scrolling by Nathan Chantrell http://nathan.chantrell.net
*/
#include "Wire.h"
#include "OLedI2C.h" // http://www.gadjetsblog.blogspot.co.uk/2013/09/oled-1602-display-and-library-for.html
void setup() {
Wire.begin();
LCD.init();
LCD.clearLcd();
}
void loop() {
scrollString("Slowly scrolling text on line one...",0,200);
scrollString("and faster on line two...",1,100);
}
No comments:
Post a Comment