LCD5110_Basic Library

I’ve been trying to use the LCD5110_Basic library (henningkarlsen). I can’t get any of the examples to compile. I think the problem is that I don’t have hardware/avr/HW_AVR_defines.h in the correct location, but I’ve not guessed right.
Any suggestions appreciated.

Here’s the first few lines of the Error message:
In file included from LCD5110_NumberFonts.ino:19:
C:\Program Files (x86)\Arduino\libraries\LCD5110_Basic/LCD5110_Basic.h:57:42: error: hardware/avr/HW_AVR_defines.h: No such file or directory
In file included from LCD5110_NumberFonts.ino:19:
C:\Program Files (x86)\Arduino\libraries\LCD5110_Basic/LCD5110_Basic.h:93: error: ‘bitmapdatatype’ has not been declared

[/// LCD5110_NumberFonts (C)2013 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of the included number-fonts,
// and how to use them.
//
// This program requires a Nokia 5110 LCD module
// and Arduino 1.5.2 (or higher).
//
// It is assumed that the LCD module is connected to
// the following pins.
//      SCK  - Pin 8
//      MOSI - Pin 9
//      DC   - Pin 10
//      RST  - Pin 11
//      CS   - Pin 12
//

#include <LCD5110_Basic.h>

LCD5110 myGLCD(3,4,5,6,7);
extern uint8_t SmallFont[];
extern uint8_t MediumNumbers[];
extern uint8_t BigNumbers[];

void setup()
{
  myGLCD.InitLCD();
}

void loop()
{
  for (int i=0; i<=10000; i++)
  {
    myGLCD.setFont(MediumNumbers);
    myGLCD.printNumF(float(i)/3, 2, RIGHT, 0);
    myGLCD.setFont(BigNumbers);
    myGLCD.printNumI(i, RIGHT, 24);
  }
  
  myGLCD.setFont(SmallFont);
  myGLCD.print("|            |", CENTER, 16);
  delay(500);
  for (int i=0; i<12; i++)
  {
    myGLCD.print("\\", 6+(i*6), 16);
    delay(500);
  }
  myGLCD.clrScr();
}code]

You intend to someday tell us where you got the library?

The library came form here:

http://www.henningkarlsen.com/electronics/library.php?id=44

So, where did you put the hardware folder?

I put it in Arduino/hardware/avr/HW_AVR_defines.h

I had to create the avr file.

chris13409:
I've been trying to use the LCD5110_Basic library (henningkarlsen). I can't get any of the examples to compile.

// This program requires a Nokia 5110 LCD module

// and Arduino 1.5.2 (or higher).

Yes, there was never any doubt about where the HenningKarlsen library came from, but are you sure you are using the right version of the Arduino IDE? I have recently installed a new IDE on a laptop, but I'm sure it is only V1.05. It's amazing how easy it is to miss these things, I tried this library and couldn't get it to compile either. This was just a side issue to Henning's UTFT stuff and I didn't bother pursuing it, so thanks for drawing this to my attention.

If this is your problem, you might find a preferable solution by using the standard Philips PCD8544 library. Also, Stuart Lewis has a good proof of the pudding with no library.

I was interested in the Henning Karlsen library only inasmauch that it appears to have multi fonts, rather like the UTFT library, and I wondered if they were like those on my phone. I'm not sure this is such a good idea anyway, and the PCD8544 probably has more practical value.

Thanks Nick. Looks like I'm using the wrong version. Reading is important. I'll down load the latest version and try that.

OK, I’ll be interested to hear how you go, but note the PCD 8544 library!

pic shows display using that - no choice with fonts but special characters can be made.

I put it in Arduino/hardware/avr/HW_AVR_defines.h

That's not where it goes. It goes in the folder with the source and header files.

I have had another go at this stuff, and everything appears to be fine. I don't know where I stuffed up before but there is no hocus-pocus, it is really quite straightforward, and no need to upgrade to V1.5.

I did this with v1.0.5 - r2, not v1.5, which I understand is a beta version. I don't know why Karlsen calls for v1.5, it might be just a typoographical error and it clearly isn't the reason why I had grief with this. The examples also compile in v 1.0.1.

When you extract from the .rar, the entire LCD5110_Basic folder goes into the libraries folder just like any other library,and that is all you need to know.

Using the library examples:

The big numbers are streaky - as expected. This might be fixable.

The small font is just as good as that in PCD8544 and it has added special characters.

The Henning Karlsen library has a huge advantage over the Philips one in that the wiring to the pins is called in the programme, which is exactly how it should be. This also means that, even though Karlsen doesn't actually do it, getting the 5110 onto the SPI bus is a painless exercise. This library would have saved me some grief if I had known about it a couple of years ago.

The Philips library may be more memory efficient, is probably more efficient with the real estate on the display, and is also better known, but I believe Karlsen's is a better library to start with.

Thanks for the help. I finally got it to compile by starting all over again using a different computer. With the whole thing dropped into the libraries folder it works fine. My files are a bit of a mess on my main computer.