LiquidCrystal 4x40 library for Arduino 1.0.1

Hello, looking for a 4x40 LiquidCrystal library for Arduino 1.0.1
HD44780 based.
I assume the standard LiquidCrystal library will not handle 4 x 40 displays.
Can you help

Many thanks
Tony

It will handle - the method begin () is your friend. :slight_smile:

best regards
Andreas

Andreas thanks
So
lcd.begin(40, 4);

Syntax

LiquidCrystal(rs, enable, d4, d5, d6, d7)
LiquidCrystal(rs, rw, enable, d4, d5, d6, d7)
LiquidCrystal(rs, enable, d0, d1, d2, d3, d4, d5, d6, d7)
LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7)

But my display has 2 enable lines

It will handle - the method begin () is your friend.

No it won't.

There is a library written specifically for the 40x4 displays. Start here: Google Code Archive - Long-term storage for Google Code Project Hosting.

Also - there's another method using two instances of the regular library mentioned here: 40x4 Display (FDCC4004A-FLYYBW-51SE, 2x ST7066U) - Displays - Arduino Forum

Don

Hi Don
The two instances of the regular library looks a little trick for me regarding incorporation into what I already have.
The liquidcrystal440 looks ideal but I am unsure of which download to take.
I assume LiquidCrystal440.zip/enhanced arduino liquidcrystal library /Apr 2010 will not be compatible with IDE1.0.1

Is this (top one on download page) the version I need to take LiquidCrystal1.0.zip/LiquidCrystal for Arduino 1.0/Sep 2011

Many thanks
Tony

Using the two instances method, if you know what line you want to print on, you can use this method:

byte line = 2; //This is which line you want, it could come from anywhere
lcd[(line/2].setCursor(0,(line%2));
lcd[(line/2].cursor();
lcd[(line/2)?0:1].noCursor();
lcd[(line/2)].println("Prints to the correct line");

If you chose the other library, the version for 1.0 will almost certainly work fine with 1.0.1

Well I feel as though I am getting closer :slight_smile:

I renamed the LiquidCrystal library that came with IDE1.0.1

I then copied in the new library from LiquidCrystal1.0.zip/LiquidCrystal for Arduino 1.0/Sep 2011
as 'LiquidCrystal'

I then changed the code
//New line below
//Syntax
//LiquidCrystal lcd(RS,RW,Enable1,Enable2, data3,data2,data1,data0);
LiquidCrystal lcd(13,255,12,7, 11,10,9,8);

// Old line below
//LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

In the void setup() I put
lcd.begin(40, 4); // Set up the LCD's number of columns and rows:

On compile I get
no matching function for call to 'LiquidCrystal::LiquidCrystal(int,int,int,int,int,int,int,int)
MyProgName:345: error: no matching function for call to 'LiquidCrystal::LiquidCrystal(int, int, int, int, int, int, int, int)'
C:\arduino-1.0.1\libraries\LiquidCrystalorg/LiquidCrystal.h:56: note: candidates are: LiquidCrystal::LiquidCrystal(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)

I notice the compile error refers to LiquidCrystalorg, I renamed the original library to org

I have tried restarting IDE

Edit
I have now moved the LiquidCrystalorg out of the Library folder whilst IDE was shutdown and get a good compile.
It seems as though IDE tracked the rename of the original library and did not like the additional parameters I passed in.
Will try the hardware tomorrow
Thanks

If you rename a library, or change its file path, or add a new one, you have to restart the IDE to get it to register the changes.

If you use the two instance technique then you will have to deal with two cursors (if you use visible cursors). I believe that John took care of this in LiquidCrystal440 and in LiquidCrystal1.0.

Don

Good point. I changed the code snippet I posted to account for the cursor problem.

Working fine

Thanks all