Understanding LCDs better


i received arduino during holidays , have started messing around simple 16x2 lcd.

i've put various bits of data on screen no issues.  wanted configure display message on 1 line longer 16 characters did following

code: [select]
lcd.setcursor(0,0);
 if (strlen(message) > 16) {
    (int x = 0; x < 16; x++) {
      lcd.print(message[x]);
    }
  lcd.setcursor(16,0);
  lcd.autoscroll();
  (int x = 16; x < strlen(message); x++) {
    lcd.print(message[x]);
    delay(1000);
  }
 }


it adds 1 additional character next column of first row every second, after 40th character (it might 39th or 41st) looks automatically drops second row, first column.  see original text on first row, , 41st(ish) character of char array on second row.

am hitting maximum columns allowed per row , it's auto wrapping or missing in code i've written?

quote
am hitting maximum columns allowed per row , it's auto wrapping
yes. link explains all.

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


Arduino Forum > Using Arduino > Displays > Understanding LCDs better


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code