Go Down

Topic: Scroll Text LCD Row 1 , no scroll text at Row 2 (Read 2829 times) previous topic - next topic


Nov 17, 2012, 06:41 pm Last Edit: Nov 17, 2012, 06:43 pm by ArduinoPat Reason: 1
Dear All,

Here my setup ; Arduino Uno , LCD  connected with the PCF8574A ( I2C )  

I have experiment with the follow sketch:
Code: [Select]
 * this sketch scrolls text left when tilted
 * text scrolls right when not tilted.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

const int numRows = 2;
const int numCols = 16;

const char textString[] = "                  * ArduinoPat *      ";
const int textLen = sizeof(textString) -1;
boolean isTilted = false;
LiquidCrystal_I2C lcd(0x38,16,2);

void setup()
  lcd.begin(numCols, numRows);

void loop()
  for (int position = 0; position  < textLen; position++)
   for (int position = 0; position  < textLen; position++)

In Row one the text scrolls ( that's what i want )
But i will also put text at Row two, but whatever i try , this text will scroll either.

Maby some of you can give me a correct answer , the text will stay at Row two.

Many thanks for reading this topic

Regards ,

Patrick ,The Netherlands


But i will also put text at Row two, but whatever i try , this text will scroll either.

That's what the scrollDisplayLeft() and scrollDisplayRight() methods do.

You want to emulate scrolling, by changing the message shown on line 1 each time through loop.

Show like so
Code: [Select]
Arduino is great
rduino is great A
duino is great Ar

It isn't that difficult to shift the array around. Even better, though, is to simply print two different parts of the one array each time. First, print 0 to n of the array and nothing. Then, print 1 to n and 0. Then 2 to n and 0 to 1. Then, 3 to n and 0 to 2. Keep this up until you are printing n and 0 to n-1. Next time, you start over.

Get rid of the unnecessary curly braces in loop.


Dear PaulS

Thanks for reply,

I want a text show at row 2 but without scroll effect,

Row 1 is scrolling text now , and that is what worked well now,

Maby you can show me an option to bring this at my sketch


Patrick ,The Netherlands


Jan 30, 2013, 08:07 am Last Edit: Jan 30, 2013, 08:09 am by job_revi Reason: 1
Code: [Select]

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);

String txtsc,txtnosc;
void setup(){
  txtnosc="Text No Scroll";
  txtsc="Text Scrolling  "
  lcd.begin(16, 2);

void loop(){


String ScrollTxt(String txt){
 return txt.substring(1,txt.length()) + txt.substring(0,1);

i hove this help  :smiley-mr-green:

"Semoga membantu"
Berbagi itu indah

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131