のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

lcd.write(0)でエラー:call of overloaded 'write(int)' is ambiguous

LiquidCrystal Library - Custom Charactersをコンパイルしたらエラーがでた。

 lcd.write(0);
||<<

キャストしたら、エラーが消えた。
>||
  lcd.write((uint8_t)0);
CustomCharacter.ino: In function 'void setup()':
CustomCharacter:115: error: call of overloaded 'write(int)' is ambiguous
D:\arduino\arduino-1.0.4\libraries\LiquidCrystal/LiquidCrystal.h:82: note: candidates are: virtual size_t LiquidCrystal::write(uint8_t)
D:\arduino\arduino-1.0.4\hardware\arduino\cores\arduino/Print.h:49: note:                 size_t Print::write(const char*)