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/

Driving a 20x4 LCD with the raspberry pi

by meistervision on Sat Aug 25, 2012 10:54 pm

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?
meistervision
 
Posts: 3
Joined: Sat Aug 25, 2012 2:36 pm

Re: Driving a 20x4 LCD with the raspberry pi

by meistervision on Sun Aug 26, 2012 2:02 am

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/08/20x4-lcd-module-control-using-python/

I'm still curious if anyone has gotten the adafruit python lib to work with 20x4 displays
meistervision
 
Posts: 3
Joined: Sat Aug 25, 2012 2:36 pm

Re: Driving a 20x4 LCD with the raspberry pi

by dmt195 on Sat Sep 22, 2012 8:54 am

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 | TOGGLE FULL SIZE
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")
dmt195
 
Posts: 1
Joined: Sat Sep 22, 2012 8:50 am

Re: Driving a 20x4 LCD with the raspberry pi

by sportsnapper on Fri Oct 19, 2012 5:56 am

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??
sportsnapper
 
Posts: 3
Joined: Fri Oct 19, 2012 5:53 am

Re: Driving a 20x4 LCD with the raspberry pi

by thogue on Wed Oct 24, 2012 6:09 pm

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.
thogue
 
Posts: 3
Joined: Mon Oct 15, 2012 10:22 pm

Re: Driving a 20x4 LCD with the raspberry pi

by wormfishin on Wed Jan 09, 2013 11:37 pm

I'm having the same problem. Were you guys able to get scrolling to work?
wormfishin
 
Posts: 4
Joined: Fri Dec 28, 2012 11:10 am

Re: Driving a 20x4 LCD with the raspberry pi

by shiran.tal on Mon Jul 22, 2013 11:02 am

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.
shiran.tal
 
Posts: 4
Joined: Mon Jul 22, 2013 10:46 am

Re: Driving a 20x4 LCD with the raspberry pi

by wormfishin on Mon Jul 22, 2013 11:33 am

This is the LCD I'm using.

https://www.adafruit.com/products/198
wormfishin
 
Posts: 4
Joined: Fri Dec 28, 2012 11:10 am

Re: Driving a 20x4 LCD with the raspberry pi

by shiran.tal on Tue Jul 23, 2013 6:17 am

Thanks @wormfishin
shiran.tal
 
Posts: 4
Joined: Mon Jul 22, 2013 10:46 am

Re: Driving a 20x4 LCD with the raspberry pi

by wormfishin on Tue Jul 23, 2013 7:12 am

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.
wormfishin
 
Posts: 4
Joined: Fri Dec 28, 2012 11:10 am