Monday 1 May 2017

Using LCD Library with Johnny Five on Node Js and Arduino

I am trying to make my lcd turn it off the backlight and on again.

The command to turn it on: lcd.noBacklight(); is working fine, but I don't know how to turn it on again.

var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {

  var lcd = new five.LCD({
    controller: "PCF8574T"
  });

  lcd.cursor(0, 0).print("1 Hello Teste");
  lcd.cursor(1, 0).print("2 Hello Teste");
  lcd.cursor(2, 0).print("3 Hello Teste");
  lcd.cursor(3, 0).print("4 Hello Teste");

  lcd.noBacklight();

  setTimeout(() => {
    lcd.yesBacklight(); //Here I don't know what to do
  }, 1500);

  setInterval(() => {
    lcd.noBacklight();
  }, 1500);


});

How could I turn it on again?



via Alisson Oliveira

No comments:

Post a Comment