8 years, 10 months ago.

how can print a blinking text on a 16*2 lcd?

<<code>> while(timeleft >0){ if(timeleft<4){ lcd.locate(1,0); lcd.printf("Time = %2.2f mn", time*15); } else{ lcd.locate(1,0); lcd.printf("Time = %1.2f Hr",(T)*15/60.0); } lcd.locate(0,1); lcd.printf("Timeleft:%1.2f Hr",timeleft*15/60.0); wait(900); timeleft; lcd.cls();

} <<code>>

Question relating to:

1 Answer

8 years, 10 months ago.

Please use <</code>> to end the posted code section and keep it readable.

Standard HD44780 displays dont support blinking text. Some compatible controllers will support a few blinking user defined special characters. The easiest way to blink the whole display is by calling the display on/off method at regular intervals. Blinking only a few characters can be done by writing the characters, waiting for some time, writing spaces to the character locations, waiting, and writing the same text again. Make sure you dont interfere with any ongoing write operations to the display when you use some Ticker interrupt functions to create the blinking effect.

Accepted Answer