I had had my SparkFun SerLCD V2.5 Serial Enabled 16x2 LCD setup with my Arduino and it worked well. Recently it started to act weird.
The simplest example code where the problem occurs is this:
#include <NewSoftSerial.h>
NewSoftSerial LCD = NewSoftSerial(255, 2); // LCD is connected to arduino on Pin 2
void setup()
{
pinMode(2, OUTPUT);
LCD.begin(9600);
LCD.print("world");
}
void loop()
{
}
}
The word “world” should (and used to) appear on the LCD on line one. But now it weirdly wraps around to line two after the first letter.
A similar thing happens if I move the cursor to position 2 before printing. The text wraps to the second line and only the left-most four characters of the LCD show text.
However when I instead move the cursor to position 3 (or any position after that), the text appears as expected.
Any ideas what the cause of this behavior could be?
(I tested with arduino 0022 with its SoftwareSerial.h library and the NewSoftSerial library 10c)
What changed in between it working and it not working?
Did it definitely work?
Are you using the same version of Arduino software as you used before?
Are you using the same test sketch as you used before?
If the answer to all these is yes, then it is quite likely that it has a fault, or the Arduino has a fault, or there is a fault in the connection between the two.
Rewire it and then try a different Arduino board.
If neither of them fix the problem, its probably the LCD thats developed a fault.
Buy a new one and if it works with your setup, something else was to blame, but at least you now have two LCDs
Did you, at any time, upload to the Arduino with the LCD module connected to it? If you do a bit of searching here, you’ll find several discussions of how doing that can reprogram the LCD module to do odd things. The good news is that your search should also point you to a recovery procedure.