Looking for i2c 4x20 lcd/oled with keybord control with a good Arduino library

I'm looking for such a display:
. lcd or (better) oled

  • 4x20 characters
  • keybord controller (4x4)
  • a good existing arduino library with printf command if possible
    . reasonable price

Any suggestion?

Roberto

This one is about $35 but only has 3x4 keyboard support.
http://www.robotshop.com/devantech-lcd03-4x20-serial-lcd-blue.html

This one is $40 but does support 4x4 keypads:

No OLED items?
It seems that printf is not supported (as far as i can understand reading .cpp files of the libs).

$32.82 OLED 4x20 with SPI interface:
http://www.digikey.com/1/parts/2398416-display-oled-char-4x20-grn-nhd-0420dzw-ag5.html

You do know that there is this thing called Google if you want more choices. :slight_smile:

Unfortunately google does'nt give you any feedback about use in real Arduino projects
In the past I've got nice googling hw with poor or none library support.
Advices by Arduino developers, as you are, on direct hw usage are precious and (lot) money (and time) saving ...
Hoping not bothering you all ... :frowning:

If you really want printf function, use sprintf instead. Arduino has no default output device, which is where printf outputs. If you don't mind TTL serial output, check out mine. It's guaranteed to run on 4X4 keypad and runs multi-tap input plus a couple dozen more features.

http://www.inmojo.com/store/liudr-arduino-and-physics-gadgets/item/serial-lcd-back-pack---phi-panel/

You can even purchase it with a membrane matrix keypad as a package.

Or just write your own printf using whatever output device you want to use:

E.g. for Serial.print:

char printf_buf[80];
int printf(const char* fmt, ...)
{
  int ret = 0;
  va_list ap;
  va_start(ap, fmt);
  ret = vsnprintf(printf_buf, sizeof(printf_buf), fmt, ap);
  va_end(ap);

  Serial.print(printf_buf);

  return ret;
}

Edit: changed unsigned int ret to signed int.

Ops. I lost an "s" character. I wanted sprintf "support".
Thanks you guys for your support. I found some nice products and even contacted the author of liquindCrystal_i2c lib too.
The use of low cost chinese lcd+I2c backplanes requires custom libs, shortly and barely supported by the factory. Even worse chinese sellers tend to hide the real producer and are not committed to support the product.
Until now i did'nt find any "official" lib (published in Arduino playground and with reachable author) supporting both I2c lcd and integrated keypad .
The quest must go on ...

There is no official I2C liquid crystal library. Anything not included in arduino IDE 1.0 is contributed. I agree with you that most ebay sellers are just selling cause they think they make money selling and that's why I put support at top priority. Unfortunately mine is not I2C. Just to clarify, although you can get lib for an I2C LCD, the library goes with the particular I2C LCD and is not useful if you switch to another I2C LCD. Also arduino still does the heavy lifting to communicate with the LCD so your code will be long with the included lib and arduino spends time to do the LCD control. On the other hand, serial LCDs (on TTL serial) require no library so there won't be a time where you want lib and the lib is not up to date and won't compile. Also the serial LCD controller does all the heavy lifting for arduino. Your code is small since there's no lib to include. Those are some of the reasons I make and sell serial LCDs and not I2C IO extender LCDs.

Two different I2C LCDs and why one is so much cheaper than the other/serial LCD:

  1. LCD with I2C IO port extender. The port extender is a buck. There is no "brain" on this type of I2C LCDs. Arduino does all heavy lifting and is prone to long sketch and broken library problems.

  2. LCD with controller that talks I2C with arduino. The controller is a few bucks and needs support such as crystal caps etc. There is a "brain" on this type of I2L LCDs. The controller does all heavy lifting so arduino has short sketch but there is still potential for broken library problems.

  3. Then the serial LCD. It's around the same as 2) in terms of price and sometimes a serial LCD offers I2C connectivity. It's not prone to broken library since everything is sent in serial text streams and arduino also has short sketch. You can also connect this type of LCD directly to a PC with a USB TTL adapter! The input and output are both asynchronous and buffered against overflow on arduino and serial LCD. --- I'd go with this one cause I make the best serial LCDs ;).

That is a really good introduction on choosing an lcd!
I like your approach, and I saw your serial LCD. There is a lot of "brain" inside. I think that it could be the appropriate choice for many projects and you tempted me to buy it (damn!).
On my side, as I'm going to integrate as many I2c device as possible, I would prefer not to manage two interfaces at the same time. The I2c has a strong point on its bus. You can buy a passive, small and cheap backplane and connect all the i2c devices you like, using 4 mu pins at all!

There is also a drawback in putting too much "brain" into devices: with the "brain" you put also logics, syntax and structure. That make impossible a drop-in substitution of a smart LCD with an other one.
That is similar to the broken library problem: you have to change the app code instead of the library code.

Very good points! Indeed I worried about that (different serial LCDs speak different commands), so, I have used all ANSI escape codes as much as I can so all functions are ANSI escape code driven or ASCII control code driven. So if you want to clear screen, that is \f (old speak for printer to spit out the entire sheet and ready a new sheet, feed). If you want to change LCD coordinates, you do the ANSI escape sequence "CSI n ; m H", which is say "\e[2,4H" for 2 row and 4 column with 1-based numbers. I wish every serial LCD speaks ANSI, which is by far the most appropriate standard for a character display, but only few do and mine speaks the most ANSI words. All specific functions such as menus and scrolling texts are also implemented as custom ANSI escape sequence for maximal standardization. I'm pretty sure Sparkfun serial LCD won't speak ANSI since it has a big brain but little intelligence inside. :wink:

brunialti,

Could I possibly quote your response on my blog, where I posted my "serial LCD is best" comments? It would be great to have your response there for different points of view.

Liudr

sure!