Please could someone help. I have been wiring up a 16 x 2 LCD screen with an Arduino Uno and trying various code. At first I got on really well and it was doing exactly as I wanted, learning the code well. then yesterday the screen started showing unusual characters.
I have re-wired it numerous times to ensure that I have done it exactly as it is meant to be. And I have taken the code back to basics but it is still causing the same issue.
I have even bought another LCD screen just in case it was that.
Here is the code: -
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
void setup() {
lcd.begin(16,2);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Hello");
delay (500);
}
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
void setup() {
// initialize and clears LCD
lcd.begin(16,2);
delay (5000); // is the display clear for 5 seconds ?
}
void loop() {
// put your main code here, to run repeatedly:
lcd.clear(); // clear display
lcd.print("Hello");// writes to line 0, position 0
delay (5000); // show hello for 5 seconds
lcd.clear(); // clear display
lcd.print("The quick brown fox jump over the lazy dog 1234567890" // writes to line 0, starting position 0 uses most ASCII printable characters and may not write all of them on LCD or overwrite some
delay (5000); // show it for 5 seconds
}
I have just quickly touched up some of the soldering and also tried the code above but it is still not working. I tried with both screens to see if it made a difference but neither are showing what they are meant to.
What does +5v read at the LCD?
With the power off, check the resistance from each pin at the LCD to the corresponding ARDUINO header pin.
The contrast could be lowered.
Have you tried using different pins for the display, like:
LiquidCrystal lcd(12,11,7,6,5,4);
Next, can you test the code on a different Arduino? Finally, do you know that the display works with this LiquidCrystal library? (I think there is more than one LiquidCrystal library.)
LarryD:
What does +5v read at the LCD?
With the power off, check the resistance from each pin at the LCD to the corresponding ARDUINO header pin.
The contrast could be lowered.
I will give this a go when I get home this evening.
econjack:
Have you tried using different pins for the display, like:
LiquidCrystal lcd(12,11,7,6,5,4);
Next, can you test the code on a different Arduino? Finally, do you know that the display works with this LiquidCrystal library? (I think there is more than one LiquidCrystal library.)
I do have an Arduino Micro which I have tried it with but am still getting the same problem. I will try testing the different pins when I get home. Now that is an interesting question with the library. The library was for the first LCD screen I had, although I have bought a similar screen (both 16 x 2 LCD's) I am not sure it is correct, I just assumed it would be. How could I check this?