Driving a 20x4 LCD with the raspberry pi

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
meistervision
 
Posts: 3
Joined: Sat Aug 25, 2012 3:36 pm

Driving a 20x4 LCD with the raspberry pi

Post by meistervision »

Is it possible to drive a 20x4 LCD display with the pi using adafruit's Adafruit_CharLCD python library? I have followed the 16x2 tutorial and searched everywhere, but I haven't figured out how to write to rows 3 or 4. I can write to the first two rows of the 20x4 just fine. Any ideas/help?

User avatar
meistervision
 
Posts: 3
Joined: Sat Aug 25, 2012 3:36 pm

Re: Driving a 20x4 LCD with the raspberry pi

Post by meistervision »

OK... replying to my own post :P. I did find some python code here that enables you to write to 20x4 displays with the Pi:

http://www.raspberrypi-spy.co.uk/2012/0 ... ng-python/

I'm still curious if anyone has gotten the adafruit python lib to work with 20x4 displays

dmt195
 
Posts: 1
Joined: Sat Sep 22, 2012 9:50 am

Re: Driving a 20x4 LCD with the raspberry pi

Post by dmt195 »

There are methods in the library. I've just tried to go about this myself.

Under main I used the following (which worked fine):

Code: Select all

if __name__ == '__main__':
    lcd = Adafruit_CharLCD()
    lcd.begin(20,4)
    lcd.clear()
    lcd.message("Test line 1\nTest line 2")
    lcd.setCursor(0,2)
    lcd.message("Test line 3")
    lcd.setCursor(0,3)
    lcd.message("Test line 4")

User avatar
sportsnapper
 
Posts: 3
Joined: Fri Oct 19, 2012 6:53 am

Re: Driving a 20x4 LCD with the raspberry pi

Post by sportsnapper »

Is there any way using the library that you can get the text to scroll from left to write. I've tried some of the methods such as autoscroll(), Displayleft() and and all I seem to succeed in doing is getting a blank screen.

A working example would be great.

Or do I need to use lower level commands??

thogue
 
Posts: 3
Joined: Mon Oct 15, 2012 11:22 pm

Re: Driving a 20x4 LCD with the raspberry pi

Post by thogue »

I am wondering the same question as above.

I actually thought things didnt work... but indeed they do lcd.scrollDisplayRight() works, but it just spends a fair share of time off the screen. Counting in my head, it took 12 shifts from when "Adafruit" leaves the screen until It came back on the other side.

Maybe we can develop a work around for this functionality.

User avatar
wormfishin
 
Posts: 7
Joined: Fri Dec 28, 2012 12:10 pm

Re: Driving a 20x4 LCD with the raspberry pi

Post by wormfishin »

I'm having the same problem. Were you guys able to get scrolling to work?

User avatar
shiran.tal
 
Posts: 4
Joined: Mon Jul 22, 2013 11:46 am

Re: Driving a 20x4 LCD with the raspberry pi

Post by shiran.tal »

Could you guys tell me which 20x4 screen you used for the Ras. Pi? Could you post a link so I would be able to purchase it?

Thanks.

User avatar
wormfishin
 
Posts: 7
Joined: Fri Dec 28, 2012 12:10 pm

Re: Driving a 20x4 LCD with the raspberry pi

Post by wormfishin »

This is the LCD I'm using.

https://www.adafruit.com/products/198

User avatar
shiran.tal
 
Posts: 4
Joined: Mon Jul 22, 2013 11:46 am

Re: Driving a 20x4 LCD with the raspberry pi

Post by shiran.tal »

Thanks @wormfishin

User avatar
wormfishin
 
Posts: 7
Joined: Fri Dec 28, 2012 12:10 pm

Re: Driving a 20x4 LCD with the raspberry pi

Post by wormfishin »

No Problem, let me know if you have any issues with it. after some minor tweaks I was able to get mine to work the way I wanted.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”