Wrap-around and scrolling support for LCDs
Moderators: adafruit_support_bill, adafruit

Wrap-around and scrolling support for LCDs

by sridhar_rajagopal on Thu May 30, 2013 11:55 am

Hi,

I had updated the Adafruit_CharLCD.py to include support for automatically wrapping around longer text, and also added a new method for scrolling arbitrary length text from right to left (just call lcd.scrollingMessage("This is a really long message that will scroll slowly from left to write") ), when doing my Instructable for a Raspberry Pi Stock Ticker (see http://www.instructables.com/id/Raspber ... store-LCD/).

I also added code to make it work with my 8x2 (that looks like a 16x1) surplus store LCD.

I thought the changes might interest others working with LCDs too, so I'm sharing it here. It would not allow me to upload a .py file, so I've renamed them to .txt - don't forget to rename to .py!

Cheers,
Sridhar
Attachments
stockTicker.txt
(1.01 KiB) Downloaded 83 times
Adafruit_CharLCD.txt
(8.16 KiB) Downloaded 94 times
sridhar_rajagopal
 
Posts: 17
Joined: Sun Dec 23, 2012 10:38 pm

Re: Wrap-around and scrolling support for LCDs

by adafruit_support_mike on Thu May 30, 2013 2:38 pm

Thank you! I'm sure that will get a lot of use.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 9482
Joined: Thu Feb 11, 2010 1:51 pm

Re: Wrap-around and scrolling support for LCDs

by TheSlider on Tue Oct 22, 2013 11:47 am

Greetings,

Thank you a lot sridhar_rajagopal, this works fine with an lcd screen i recovered from an old printer, it's a 1x16 characters lcd with 14 pins (14x1, no backlight), a VHX1610A.

I initially used this tutorial from Mikey Sklar to wire everything up but used a resistor instead of a potentiometer (no need to adjust) and noticed the lcd didn't display the test correctly as It's considered to be 2 lines of 8 chars just like you (2x8). See here for more info : http://spikenzielabs.com/SpikenzieLabs/LCD_How_To.html

I wish the Adafruit_CharLCD api was updated on github to provide support for these characteristics. Initializing with lcd.begin(16,1) or lcd.begin(8,2) gave the same result (only shows the first 8 chars for each "line").

Note : Please use spaces instead of tabs in the code and be consistent !
TheSlider
 
Posts: 1
Joined: Tue Oct 22, 2013 11:14 am