Hello,
I am trying to make my library arduino1.0 compatible,
But I can't figure out why it's not working.
first problem I have and I don't know if it's a real problem though :
in function IOlcd:: write()
I have Wire.print but when I'd want to change this to Wire.write give's me an error:
/home/robert/sketchbook/libraries/IOlcd/IOlcd.cpp: In member function ‘virtual size_t IOlcd::write(uint8_t)’:
/home/robert/sketchbook/libraries/IOlcd/IOlcd.cpp:203: error: call of overloaded ‘write(int)’ is ambiguous
/home/robert/arduino-1.0/libraries/Wire/Wire.h:55: note: candidates are: virtual size_t TwoWire::write(uint8_t)
/home/robert/arduino-1.0/hardware/arduino/cores/arduino/Print.h:49: note: size_t Print::write(const char*)
I do not understand what is happening here?
Second problem,
The sketch compiles and when i use Example code:
//include the nesecary header files for this to work.
#include <IOlcd.h>
#include <Wire.h>;
IOlcd lcd;
long count = 1;
int initvalue;
void setup(){
//initialize the chip(in this case MCP23016) at address 0x20
initvalue = lcd.init(0x20, MCP23016);
//start the lcd
lcd.begin(16,2);
//at the begining of the first line.
lcd.home();
//clear lcd just incase.
lcd.clear();
//print hello world to the first line.
lcd.print("Hello, World!");
}
void loop(){
//set cursor to the second line.
lcd.setCursor(0,1);
//number of seconds active, is printed.
lcd.print(count);
count++;
delay(1000);
}
Doesn't display, so I serial print value returned by lcd.init();
and that's 1, so it must be working, atleast first function.
So I hope you can help me out with this
Greetings,
Duality
ps. doesn't let me upload so here a link to source:
http://www.mediafire.com/?oob5c7emljdug9u