system
July 19, 2012, 12:58pm
1
Hello I just tested my new LCD display and it works fine.
The setup I'm using is this:
When I run the following code everything works as intended:
void setup()
{
lcd.begin(16,2);
lcd.print("Hello World");
}
But if I add Serial.begin(9600); liked this, the display shows weird symbols and doesn't update anymore, why is that?
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
lcd.print("Hello World");
}
system
July 19, 2012, 1:31pm
2
Where is the rest of your code?
system
July 19, 2012, 3:55pm
3
AWOL:
Where is the rest of your code?
That is the code, just made a simple example to point out my problem.
system
July 19, 2012, 4:12pm
4
That doesn't compile.
sketch_jul19a.cpp: In function 'void setup()':
sketch_jul19a:3: error: 'lcd' was not declared in this scope
Where is your lcd declaration?
system
July 19, 2012, 6:01pm
5
#include <LiquidCrystal.h>
LiquidCrystal lcd(6,5,4,3,2,1);
void setup()
{
//Serial.begin(9600);
lcd.begin(16,2);
lcd.print("HELLO WORLD!");
}
void loop()
{
}
That is the whole code it works fine as long as Serial.begin(9600) is out commented. But if I uncomment Serial.Begin it shows the odd symbols on the display.
system
July 19, 2012, 6:13pm
6
lcd(6,5,4,3,2,1);
1?
Wouldn't it have wasted a lot less time if you'd posted that at the start?
system
July 19, 2012, 7:26pm
7
I am not sure what you mean about 1?
What is the sulotion?
Sorry if I'm asking a stupid question.
system
July 19, 2012, 7:29pm
8
Which pins does the serial interface use?
system
July 19, 2012, 7:30pm
9
Pins 0 and 1 belong to the hardware serial port. When you do Serial.begin(), it starts using the pins.
system
July 19, 2012, 7:33pm
10
I plugged it into
6,5,4,3,2,1
system
July 19, 2012, 7:34pm
11
Yes, and that's your problem, so move the pin that is connected to pin 1 on the Arduino.