Go Down

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


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.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";
String myStringB = String("this before ") + [hmm, what here?, the custom char] + String(" this after the custom char");



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

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131