Original 8bit LCD example problems

Hello Arduinians

I,m trying to run the sample code from Read Heather's original tutorial for interfacing LCD displays from the playground.
And it will not compile.

What i have done:

Downloadet the zip file
Made the C:\Arduino\hardware\libraries\Lcd directory
Placed LiquidCrystal.h, LiquidCrystal.cpp and keywords.txt in above folder
Opened the cursor_calibration.pde sample
Made sure the #include <LiquidCrystal.h> is in the code

When i compile the sketch i get a whole bunch of errors:

LiquidCrystal.cpp:8: error: declaration of C function 'void pinMode(int, int)' conflicts with
C:\Arduino\hardware\cores\arduino/wiring.h:74: error: previous declaration 'void pinMode(uint8_t, uint8_t)' here
LiquidCrystal.cpp:9: error: declaration of C function 'void digitalWrite(int, int)' conflicts with
C:\Arduino\hardware\cores\arduino/wiring.h:75: error: previous declaration 'void digitalWrite(uint8_t, uint8_t)' here
LiquidCrystal.cpp:10: error: declaration of C function 'int digitalRead(int)' conflicts with
C:\Arduino\hardware\cores\arduino/wiring.h:76: error: previous declaration 'int digitalRead(uint8_t)' here
o: In function __static_initialization_and_destruction_0': undefined reference to LiquidCrystal::LiquidCrystal()'o: In function loop': o: In function setup':

I'm using the new 0010 Arduino software on Windows XP

What is it that i have forgotten to do ?

Thanks

MikMo

I thought it was mentioned on the forum before but I couldn't find it. My best guess is that you have to change the int's in void pinMode(int, int) to uint8_t.

Yes that was it. changed it to uint8_t in 4 places and now it compiles.

Thanks

Hi,

Followed both the 8bit interfacing examples, but all I get on my 2x16 LCD is one line of 8 solid chars.

Any ideas please ?

Thanks

Stuart

My display is a rather old 16 char. one line type. I ended up using the 4 bit lib. and had to initialize it to 2 line mode so it works as 2 lines of 8 chars, but really on one line.

Try the 4 bit lib. and be very carefull that you hook up everything correct. one thing that is frequently ommited from the datasheets is the fact that you need to put a current limiting resistor on the pin for the backlight. I didn't and it got very hot before i realized it was required.