New library: RGB GLCD (LDS183 Controller)

Hello.

I have made a library for RGB GLCD's based on the LDS183 controller. This is the display that is used on the RGB LCD Shield by NKC Electronics.

You can download the library from my website: http://www.henningkarlsen.com/electronics/a_l_rgb_glcd.php

Please bear in mind that this is my first go at making a library for the Arduino, so it might not be as good as it can be.

Any feedback would be appreciated.

Regards Henning

How about a link to the display that the library is for. I'm lazy.

The display is featured in the RGB LCD shield for Arduino http://www.nkcelectronics.com/rgb-lcd-shield-for-arduino-65k-color-k65.html

but can be purchased alone: http://www.nkcelectronics.com/rgb-lcd-65k-color-module-philips-pcf8833-comp658833.html

It is PCF8833 compatible, similar to the one sold by Sparkfun but with 65K colors!

I uploaded a video (running doc_norway's library) and embedded it in the product page.

Hi Great library works well with the RGB LCD shield

Just a quick update: v1.2 is now released with two new functions.

/Henning

Another quick update: v1.3 is released with support for Arduino Mega.

/Henning

Nice library,i wanted to ask,is there any pre-function to read pixel,whether on o not?and any pre-function to fill an area and not only the circle or rettangle but an area... :-[

Hi Dobe

As far as I know there is way to read the state of a pixel.

The only way I can think of to make a flood-fill function is to keep a "screen-buffer" in memory, but as the buffer alone would require 32KB of ram this is not an option.

/Henning

RGB_GLCD v1.4 is released.

  • Added drawBitmap() with its associated tool

/Henning

Does this make use of all the analog pins? I'd like to use this for a project, but I need to make use of at least 2 analog pins and all of the other GLDs use 5 of the 6 available.

@scoobydrvr

The shield uses Digital 2-6, so all the analog pins are free for you to use :)

/Henning

That's great! Less pins than any of the others I've seen; I'm getting one!

RGB_GLCD v1.5 is released.

  • Added support for the Arduino Mega 2560
  • Added function to rotate bitmaps

/Henning

I just got mine working. (The fine soldering work was almost too much for me.) Yay!

I'd like to download your library, but don't have an RAR extractor. Can you publish a ZIP as well?

Also, do you have plans to implement a Netduino library for this shield too?

Thanks!

Jim

Rar usually get better compression, but if you PM me with your email-address or send me a message through my contact-form, I will email a zip-file to you.

I havent got a Netduino, so dont hold your breath. Maybe you would like to donate one... :)

/Henning

I just got an arduino (My first one so bear with me as I am new to this) and the LDS183. With your code I've gotten it going with very little trouble. Thank you for that!

I do have a couple of questions though

First when I display white text on a black background there appears to be white vertical lines through the text 1 pixel wide (like the pipe charecter "|") at a couple of places making the text harder to read. Is there a way to eliminate those lines?

Second, is there a way to make the text bigger? If I need to I'm happy to do some reading or coding. I just don't have a clue where to look.

Thanks again,

Loren

@Loren:

Can you post an image of the vertical bars, or post / send me your sketch?

It is possible to get bigger text, but it will involve a rather large modification to the code. You can take a look at my ITDB02_Graph libraries for ideas on how to do it. They both support small and large font.

/Henning

Thanks For your help!

Here are a couple pictures:

And here is the code:

// RGB_GLCD_Bitmap (C)2010 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of the drawBitmap()-function.
//

#include "RGB_GLCD.h"
#include 

GLCD myGLCD;

extern unsigned int icon1[0x400];
extern unsigned int icon2[0x400];
extern unsigned int tux[0x1000];

void setup()
{
  myGLCD.initLCD();
  //myGLCD.clrScr();
        myGLCD.fillScr(255,255,255);
  //myGLCD.setColor(255,255,255);
  myGLCD.print("Hello World Init",CENTER,5,255,255,255);


  // Draw a moving sinewave
  
   byte buf[126];
  int x, x2;
  int y, y2;
  int r;
  x=1;
  for (int i=1; i<3654; i++)
  {
    x++;
    if (x==127)
      x=1;
    if (i>127)
    {
      if ((x==63)||(buf[x-1]==63))
        myGLCD.setColor(0,0,255);
      else
        myGLCD.setColor(255,255,255);
      myGLCD.drawPixel(x,buf[x-1]);
    }
    myGLCD.setColor(0,255,255);
    y=63+(sin(((i*1.3)*3.14)/180)*50);
    myGLCD.drawPixel(x,y);
    buf[x-1]=y;
//    delay(3);
  }
  delay(5000);
  myGLCD.clrScr();
  myGLCD.fillScr(255,255,255);
}

void loop()
{
myGLCD.setColor(0,0,0);
  myGLCD.print("Blinking Message", CENTER,5,255,255,255);
    myGLCD.print("Line 2 stuff", CENTER,15,255,255,255);
  
 delay(1000); 
 myGLCD.setColor(255,255,255);
 myGLCD.print("Blinking Message", CENTER,5,0,0,0);
 myGLCD.setColor(0,0,0);
 myGLCD.print("Line 2 stuff", CENTER,15,255,255,255);
 delay(1000); 
  myGLCD.setColor(0,0,0);
 myGLCD.print("Blinking Message", CENTER,5,255,255,255);
 myGLCD.setColor(255,255,255);
 myGLCD.print("Line 2 stuff", CENTER,15,0,0,0);
 delay(1000); 

}

I have downloaded the graph code and will try and figure out the Large Font stuff.

Thank you again for your help.

Loren

I'll look into the problem, but it might take a couple of days...

/Hennning

I'll look into the problem, but it might take a couple of days...

/Hennning

Thank you very much...Take your time!