Driving a 20x4 LCD with the raspberry pi

Talk about Adafruit Raspberry Pi® accessories!

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/

Driving a 20x4 LCD with the raspberry pi

Postby meistervision » 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

Postby meistervision » 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

Postby dmt195 » 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
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

Postby sportsnapper » 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

Postby thogue » 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: 2
Joined: Mon Oct 15, 2012 10:22 pm

Re: Driving a 20x4 LCD with the raspberry pi

Postby wormfishin » Wed Jan 09, 2013 11:37 pm

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


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]