Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCD 16x2 does not print secondLine #16

Closed
tsypuk opened this issue Jul 9, 2017 · 3 comments
Closed

LCD 16x2 does not print secondLine #16

tsypuk opened this issue Jul 9, 2017 · 3 comments

Comments

@tsypuk
Copy link

tsypuk commented Jul 9, 2017

I'm using 16x2 LCD with your library.

It prints correctly chars at first Line of LCD, but when I'm trying print to second Line:

lcd.setCursor(1,1);
lcd.print(text, function (err) {
if (err) {
throw err;
}
});
it continuos printing text at first Line after the previous text.

@fivdi
Copy link
Owner

fivdi commented Jul 9, 2017

Thank you for reporting this issue. Please post a complete program that can be used to reproduce the error.

@fivdi
Copy link
Owner

fivdi commented Jul 10, 2017

The following program worked for me on a 16x2 LCD. It displays "Hello!" on the first line and "How are you?" on the second line.

var Lcd = require('lcd'),
  lcd = new Lcd({rs: 13, e: 19, data: [16, 26, 20, 21], cols: 16, rows: 2});

lcd.on('ready', function () {
  lcd.setCursor(0, 0);
  lcd.print('Hello!', function (err) {
    if (err) {
      throw err;
    }

    lcd.setCursor(0, 1);
    lcd.print('How are you?', function (err) {
      if (err) {
        throw err;
      }

      lcd.close();
    });
  });
});

@tsypuk
Copy link
Author

tsypuk commented Jul 10, 2017

Thank a lot.
I have verified this snippet. It work as expected with printing on first and second line.

I will double check my code.

@tsypuk tsypuk closed this as completed Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants