Setting the cursor position for a Serial LCD

JRMN:
This didn't work:

#define LCD_WIDTH 20

SparkSoftLCD lcd = SparkSoftLCD(LCD_TX_PIN, LCD_WIDTH);




This worked:


SparkSoftLCD lcd = SparkSoftLCD(LCD_TX);




I did notice something weird though. I am able to create and use custom characters with the SerLCD, however, if leave the Arduino Uno unplugged for awhile and then plug it back in, my sketch doesn't run correctly. Right now I am only using custom characters.

That's odd that the constructor didn't work for you - I suppose it gave a compile error, about not having a matching prototype... It may be resolved by saying:

SparkSoftLCD lcd = SparkSoftLCD(LCD_TX, (uint8_t) LCD_WIDTH);

Either way, it's not actuallly necessary since there is effectively no difference in how it drives the LCD with or without the width argument - that's likely an artifact from early on when it appeared the positioning arithmetic was different based on different widths. It's not actually, and you can see in the cursorTo method it behaves the same given any width (I should remove the spurious inclusion of 'lenAdd').

Sorry to hear about the damage Irene did, haven't had to deal with a hurricane around here since Ike, and that was a pretty big clean-up. Wouldn't wish that on anyone!

!c