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/
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/
- meistervision
- Posts: 3
- Joined: Sat Aug 25, 2012 3:36 pm
Driving a 20x4 LCD with the raspberry pi
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 3:36 pm
Re: Driving a 20x4 LCD with the raspberry pi
OK... replying to my own post . 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
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
-
- Posts: 1
- Joined: Sat Sep 22, 2012 9:50 am
Re: Driving a 20x4 LCD with the raspberry pi
There are methods in the library. I've just tried to go about this myself.
Under main I used the following (which worked fine):
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")
- sportsnapper
- Posts: 3
- Joined: Fri Oct 19, 2012 6:53 am
Re: Driving a 20x4 LCD with the raspberry pi
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??
A working example would be great.
Or do I need to use lower level commands??
-
- Posts: 3
- Joined: Mon Oct 15, 2012 11:22 pm
Re: Driving a 20x4 LCD with the raspberry pi
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.
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.
- wormfishin
- Posts: 7
- Joined: Fri Dec 28, 2012 12:10 pm
Re: Driving a 20x4 LCD with the raspberry pi
I'm having the same problem. Were you guys able to get scrolling to work?
- shiran.tal
- Posts: 4
- Joined: Mon Jul 22, 2013 11:46 am
Re: Driving a 20x4 LCD with the raspberry pi
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.
Thanks.
- wormfishin
- Posts: 7
- Joined: Fri Dec 28, 2012 12:10 pm
- shiran.tal
- Posts: 4
- Joined: Mon Jul 22, 2013 11:46 am
Re: Driving a 20x4 LCD with the raspberry pi
Thanks @wormfishin
- wormfishin
- Posts: 7
- Joined: Fri Dec 28, 2012 12:10 pm
Re: Driving a 20x4 LCD with the raspberry pi
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.
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/
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/