2

i want to preserve video information for long time without communicating with arduino on lcd 1602, i'm tryng to use the command of liquidCrystal library noDisplay() but when i use it,this clear all display. On arduino website here is the description of this command "Turns off the LCD display, without losing the text currently shown on it." but i lose all on screen. Thanks for reply

there is my test code

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // Turn off the display:
  lcd.noDisplay();
  delay(500);
  // Turn on the display:
  lcd.display();
  delay(500);
}

with this code display blinking and don't show continuos "hello word".

4

I tried out your code. It's working absolutely fine.

Whenever lcd.noDisplay() executes then LCD not displaying hello, word!... And whenever lcd.display() executes then LCD displaying hello, word!...

So, that's why "hello word" not continuously displaying.

And you can also find the display() and noDisplay() functions to turn on and off the display comment on top of arduino sketch.

0

I tried out your code. It's working absolutely fine.

Whenever lcd.noDisplay() executes then LCD not displaying hello, word!... And whenever lcd.display() executes then LCD displaying hello, word!...

So, that's why "hello word" not continuously displaying.

And you can also find the display() and noDisplay() functions to turn on and off the display comment on top of arduino sketch.

To follow on @Hasan's answer:
noDisplay() doesn't clear the previous displayed stuff, it just inhibits it, all displayed pixels are latched in the chip while it remains powered on.

In case you need to clear the display, you can use lcd.clear() function.

  • i don't need to clear but to preserve the words on display without communicating – Francesco Valla Mar 15 '17 at 11:53
  • Then, as Hasan answered you, just remove the first 2 lines of the loop... particularly lcd.noDisplay(); ... By the way, you can remove everything that is in the loop() function. Just update the text when needed using lcd.print("new text") function. – SMFSW Mar 15 '17 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.