mcp23008

I'm trying to get the LCD/i2c/port expander working as posted at arduinowebsite /playground/Code/I2CPortExpanderAndLCDs
but the sample code doesn't compile. I get the following error:

In function 'void setup()':
error: 'WriteLCD' was not declared in this scope

I looked in the .cpp file and don't see a WriteLCD() function but there is a WriteLCDByte() function so I changed it to WriteLCDByte but that fails the same.

Is this old code? Am I missing something? I added the .h and .cpp files to the hardware library and it is finding them. Is there an easier solution? Any help is very welcome.

this is asked bevore but is not solved

I added the .h and .cpp files to the hardware library and it is finding them.

Are you sure about this? As I read the page, I don't see the code pretending to be a library at all. The .h and .cpp files should be in the same folder as the sketch.

Post the exact error messages, all of the output, that you are getting. (Notice the scroll bars and the need to scroll back to the top.)

well this is the error

In function 'void setup()':
error: 'WriteLCD' was not declared in this scope

and the example script calls for the <LCDI2C4Bit.h>

http://www.arduino.cc/playground/Code/I2CPortExpanderAndLCDs

LCDI2C4Bit_pde.cpp: In function 'void setup()':
LCDI2C4Bit_pde:30: error: 'WriteLCD' was not declared in this scope

and when i remove it nothing happens

and when i remove it nothing happens

What is "it" that you are removing?

Does "nothing happens" mean that pushing the verify button no longer causes the compiler to be invoked?

Did you move the .h and .cpp files into the sketch folder?

I understand that you are frustrated, but you still need to respond to all the questions and suggestions, even if it is to say that you don't want to do that, whatever "that" happens to be.

the page sais it is a library
so the example (sketch is in the library)
when i remove the lcd write (moving cursor around the dislay)
i see nothing
the backlight turns on whyle uploading and that is it

so i have a library called LCDI2C4Bit
with LCDI2C4Bit.h
LCDI2C4Bit.cpp
(example) LCDI2C4Bit.pde

You had the right idea, before, of changing WriteLCD() to WriteLCDByte().

What happens when you do that, instead of removing the WriteLCD() calls?

same error exept it now shows

In function 'void setup()':
error: 'WriteLCDByte' was not declared in this scope

I modified the .h file, to add:

  void WriteLCDByte( uint8_t deviceAddr, uint8_t bdata );

I modified the .cpp file:
void LCDI2C4Bit::WriteLCDByte( byte deviceAddr, byte bdata ) {

I modified the sketch:
lcd.WriteLCDByte(ADDR,'a');
lcd.clear();
lcd.WriteLCDByte(ADDR,'c');

Now, it at least compiles. Beats me why WriteLCD is called, when it does not exist, and why WriteLCDByte is not a member of the class.