Pages: [1]   Go Down
Author Topic: LCD - CustomCharacter:117: error: call of overloaded 'write(int)' is ambiguous  (Read 6132 times)
0 Members and 1 Guest are viewing this topic.
uk
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I have been using the LCD examples that came with the IDE, I have had no problems with the Hello World one and scrolling text one, But the Custom Character one when I run it comes up with the following error:



CustomCharacter.cpp: In function 'void setup()':
CustomCharacter:114: error: call of overloaded 'write(int)' is ambiguous
C:\Users\Scott\Documents\Arduino\arduino-1.0.1-windows\arduino-1.0.1\libraries\LiquidCrystal/LiquidCrystal.h:82: note: candidates are: virtual size_t LiquidCrystal::write(uint8_t)
C:\Users\Scott\Documents\Arduino\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:49: note:                 size_t Print::write(const char*)

Being new to the programming side I am at a loss as to how to fix this error.

Any Help on this matter would be appriciated!!

Thanks

Scott.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Change
Code:
  lcd.write(0);
to
Code:
  lcd.write((byte)0);
on line 115ish.
Logged

uk
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Thanks thats sorted it!!

Scott   smiley-grin smiley-grin
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the help as well.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

why did u use the ""lcd.write((byte)0);""" instead of "lcd.write(0);"   ???  1 thing i know that if we use lcd.write(0); then complier will show "call of overloaded 'write(int) is ambiguous." why we use the byte in lcd.write() function.???
Logged

Pages: [1]   Go Up
Jump to: