PCD8544 and WProgram.h for UNO

Hello guys
I would like to ask about this WProgram.h libary. I try to upload to my UNO the next sketch but returns the error of not finding the WProgram.h library. I open with notepad the associated pdc8544.h file and corrected this by replacing it with #<Arduino.h>. Errors still coming out though and i wonder if there is newer version of PCD8544 which fit to UNO boards without modifications.

Thanks

#include<PCD8544.h>

constintkPin_CLK= 5;
constintkPin_DIN= 6;
constintkPin_DC=7;
constintkPin_RESET= 8;

PCD8544lcd(kPin_CLK, kPin_DIN, kPin_DC,kPin_RESET);

voidsetup()
{
lcd.init();
lcd.setCursor(0,0);
lcd.print("Hello,World!");
}

voidloop()
{
lcd.setCursor(0,1);
lcd.print(millis());

Jeg_1:
i wonder if there is newer version of PCD8544 which fit to UNO boards without modifications.

Your post is incoherent but I'm sure any PCD8544 library will fit comfortably in a Uno, and your problem lies somewhere else. I believe the "somewhere else" includes the use of outdated software. (That's a guess)

Thanks Nick.
First i run the sketch using the library found in www.introtoarduino.com
The error i get is this:

Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Jeg\Documents\Arduino\LCD_UNO\LCD_UNO.ino:1:0:

C:\Users\Jeg\Documents\Arduino\libraries\pcd8544/PCD8544.h:4:22: fatal error: WProgram.h: No such file or directory

#include <WProgram.h>

^

compilation terminated.

Using library pcd8544 in folder: C:\Users\Jeg\Documents\Arduino\libraries\pcd8544 (legacy)
exit status 1
Error compiling for board Arduino/Genuino Uno.


Then i modify WProgram through notepad doing it #<Arduino.h>
Run it again and error changes to:

Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Jeg\Documents\Arduino\LCD_UNO\LCD_UNO.ino:1:0:

C:\Users\Jeg\Documents\Arduino\libraries\pcd8544/PCD8544.h:30:22: error: conflicting return type specified for 'virtual void PCD8544::write(unsigned char)'

virtual void write(unsigned char chr);

^

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,

from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,

from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:232,

from C:\Users\Jeg\AppData\Local\Temp\arduino_build_743437\sketch\LCD_UNO.ino.cpp:1:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:48:20: error: overriding 'virtual size_t Print::write(uint8_t)'

virtual size_t write(uint8_t) = 0;

^

Using library pcd8544 in folder: C:\Users\Jeg\Documents\Arduino\libraries\pcd8544 (legacy)
exit status 1
Error compiling for board Arduino/Genuino Uno.

I suspect you have three problems:

  1. I said I was just guessing before, but I believe page one of that book says all you need to know about it

.....................September 30 2011

It is outdated junk which leads to

  1. All your software is junk, and everything you are doing is outdated. You need to check, but I think both Arduino.h and WProgram.h are redundant junk, but I admit I am biased and I have no idea what they are or do.

You already have an up-to-date Arduino IDE 1.8.1, and probably the latest version of PCD8544. Download a new version of 8544 just in case, and therein you will find an example "hello world" that will spare you of having to mess around with the other stuff. There is another library available from RinkyDink by Henning Karlsen. I have never used it myself, but I believe it may be better than the Philips original, and it does graphics as well. That version will surely have proper examples and instructions - it is what Henning is good at.

  1. You may have a library management problem. It certainly looks verbose, but if they are all in the same place, you shouldn't have a problem. Note that, whenever you install a new library, you need to restart the IDE so that it can find it. I put everything in the same simple folder - E:/Arduino/libraries.