16x2 LCD Scrolling Improperly for array with more then 5 strings


hi

i wrote code below scroll array of string display in lcd becomes improper if extend number of strings 6 5.

by 'improper' mean, display this,

(sorry poor image quality)
code: [select]

char* var[]={"rishi ","ripunjoy ","bikash ","champak ","deep ","madhurjya "};
#include <liquidcrystal.h>


liquidcrystal lcd(12, 11, 5, 4, 3, 2);


void setup() {
  // set lcd's number of columns , rows:
  lcd.begin(16, 2);
 
  for(int i=0;i<6;i++){
      lcd.print(var[i]); 
  } 
  delay(1000);
}


void loop() { 
  // move offscreen left:
  (int positioncounter = 0; positioncounter < 46; positioncounter++) {
        lcd.scrolldisplayleft();     
        delay(500);
  }
  delay(1000);
}



as can see, instead of showing string 'madhurjya' show 'madhurishi' , lettes 'rjya' shift second row. problem not arises if keep string restricted 5

take @ article on lcd addressing , memory locations. explains experiencing.

http://web.alfredstate.edu/weimandn/lcd/lcd_addressing/lcd_addressing_index.html

you wrapping second row @ 40 characters. not number of elements in array.


Arduino Forum > Using Arduino > Displays > 16x2 LCD Scrolling Improperly for array with more then 5 strings


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support