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".

Hasan
1,48614 silver badges28 bronze badges
asked Mar 15, 2017 at 8:43

2 Answers 2

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.

answered Mar 15, 2017 at 9:30
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.

answered Mar 15, 2017 at 11:44
2
  • i don't need to clear but to preserve the words on display without communicating Commented Mar 15, 2017 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. Commented Mar 15, 2017 at 11:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.