I will really appreciated it if some one could help me.
I have these 3 problems, I've been trying to display 2 lines of text in my LCD,
But it doesn't show anything, then it shows the: 3, 2, 1 lines of text, but not the Welcome Project.
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
 lcd.begin(16, 2);
 lcd.setCursor(0, 0);
 lcd.print("Welcome");
 lcd.print("Project");
 delay(4000);
}
void loop(){
 lcd.setCursor(0, 0);
 lcd.print("3");
 delay(1000);
 lcd.print(ant);
 }
 lcd.setCursor(0, 0);
 lcd.print("2");
 delay(1000);
 lcd.setCursor(0, 0);
 lcd.print("1");
 }
What I wanted to do is to show the "Welcome Project" only once, and then keep looping the 3, 2, 1.
But for some reasons it doesn't show the "Welcome Project" only the: 3, 2, 1.
Any help and suggestion will be appreciated it.
Thanks in advance.
What do you mean the code doesn't even copile?
when I run this code it doesn't show nothing for like 6 seconds, then it shows the: 3, 2, 1. but it does not show the "Welcome Project".
C:\Users\accou\AppData\Local\Temp\arduino_modified_sketch_506877\sketch_jan15a.ino: In function 'void loop()':
sketch_jan15a:16: error: 'ant' was not declared in this scope
 lcd.print(ant);
      ^
C:\Users\accou\AppData\Local\Temp\arduino_modified_sketch_506877\sketch_jan15a.ino: At global scope:
sketch_jan15a:18: error: 'lcd' does not name a type
 lcd.setCursor(0, 0);
 ^
sketch_jan15a:19: error: 'lcd' does not name a type
 lcd.print("2");
 ^
sketch_jan15a:20: error: expected constructor, destructor, or type conversion before '(' token
 delay(1000);
    ^
sketch_jan15a:21: error: 'lcd' does not name a type
 lcd.setCursor(0, 0);
 ^
sketch_jan15a:22: error: 'lcd' does not name a type
 lcd.print("1");
 ^
sketch_jan15a:23: error: expected declaration before '}' token
 }
 ^
Please always test code before posting it to the forum.
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
 lcd.begin(16, 2);
 lcd.setCursor(0, 0);
 lcd.print("Welcome");
 lcd.print("Project");
 delay(4000);
}
void loop(){
 lcd.setCursor(0, 0);
 lcd.print("3");
 delay(1000);
 }
The arguments set the column and row. Note they are zero-indexed. Since you want to print "Project" on the second row, starting from the first column you need to add this line before you print "Project":
You didn't read my instructions in the last reply carefully.
Take a minute to understand what your code is actually doing:
 lcd.setCursor(0, 1); // set the cursor to first column, second row
 lcd.print("Welcome"); // print "Welcome" at first column, second row
 lcd.print("Project"); // print "Project" at first column, second row
So actually it does print "Welcome" but it's only for a tiny fraction of a second before it's overwritten by "Project". You want to print "Welcome" at the first column, first row. So what should the arguments be in the setCursor statement before you print "Welcome"?
I see what you meant Pert,
I got it, this worked for me:
 void setup() {
  lcd.begin(16, 2);
  lcd.setCursor(0, 0);
  lcd.print("Welcome");
  lcd.setCursor(0, 1);
  lcd.print("Project");
  delay(4000);
 }
david_prentice:
If you get anything different, I would suspect you have installed some hacked library.
I don't even have an LCD on hand so I merely assumed that was what was going on. I only ever used an LCD on one project years ago and I was using a different library. My projects that require a display have all been network connected so I just use my computer monitor as the display.
pert:
I don't even have an LCD on hand so I merely assumed that was what was going on. I only ever used an LCD on one project years ago and I was using a different library. My projects that require a display have all been network connected so I just use my computer monitor as the display.
The type of output device does not usually matter when it comes to multiple print() outputs.
Even if you were using a serial monitor, if you do two back to back to back Serial.print() statements they will still be on the same line.