Go Down

Topic: Any Idea how to add custom characters (LCD lib) to a string? (Read 570 times) previous topic - next topic

Clemens

I specified a custom character as described on http://arduino.cc/en/Reference/LiquidCrystalCreateChar

If I like to mix "normal" character output with custom characters I use this workaround atm:

Code: [Select]
lcd.print("this before ");
lcd.write(3);
lcd.print(" this after the custom char");


I have to break the statement in three (or more) parts to add custom characters.

Is there any way to inculde this character in a single string, something like:

char myStringA[ ] = "this before [hmm, what to put here?? for the custom char] this after the custom char";
or
String myStringB = String("this before ") + [hmm, what here?, the custom char] + String(" this after the custom char");

Grumpy_Mike


Clemens

Oh, this works!! Thanks a lot, it makes my sketch much easier!

Go Up