The example code for LiquidCrystal::createChar() does not compile as written.
The call to lcd.write throws an error.
I'm using Arduino environment v1.0, with avr-gcc-4.3.2.
Compile fails on lcd.write(0).
This is called after defining a custom character and loading it into the LCD with createChar(0,smiley).
Error is: "call of overloaded 'write(int)' is ambiguous".
Looking at the code in LiquidCrystal.cpp, I see the definition is LiquidCrystal::write(uint8_t value).
The call to lcd.write can be made to work with an explicit typecast: lcd.write( (uint8_t)0 );
Curiously, if I define a variable, and use it in the call, the example compiles happily:
int zero = 0; //or unsigned int zero = 0; //OR even float zero = 0.0f;
Calling with a float or double argument compiles as well: lcd.write(0.0); or lcd.write(0.0f); .
Curiouser, while calling lcd.write(0.0f); compiles, the two of these do NOT compile: lcd.write( (int)0 ); and lcd.write( (unsigned int)0 );.
And, thanks to the previous poster, TimeWaster, for pointing out the missing 8th line in the example character definition. I completely overlooked the omission, myself. But, somehow, that part of the code managed to compile and run smoothly...