B4R Question How to display ascii characters above 127?

metheoneandonly

Member
Licensed User
Longtime User
Hello!

Like the title says, I want to display some characters with ascii code above the 127 on 16x2 LCD display, but I didn't found any function (like "chr()" in some other languages) to do it.

Please help!


Thanks in advance!
 

metheoneandonly

Member
Licensed User
Longtime User
Is it possible to create custom character without using "RunNative" and #IF C statement block, i.e. using BASIC statements/functions only?
 
Upvote 0

metheoneandonly

Member
Licensed User
Longtime User
Thank you for your quick responses. Just tried this, but seems it does not work with I2C displays. Or maybe I'm not in enough to make it work.
 
Upvote 0

metheoneandonly

Member
Licensed User
Longtime User
Does anyone know how to make custom characters with I2C displays? An example Erel gave to me is fine, but it works with LCDs without I2C daughterboard. I have only I2C displays, because those take minimum required pins and are generally easier to use, but it seems the LiquidCristal_I2C library does not have all the methods as the LiquidCristal library. Correct me if I'm wrong.
 
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

after receiving the LCD I2C, did a first test and indeed no special chars displayed using the rLiquidCrystal_I2C v1.01 library.
Have modified the rLiquidCrystal_I2C library (v1.02) and tested sucessfully. The example code and the modified library are attached.

Change made to the rLiquidCrystal_I2C library:
In rLiquidCrystal_I2C.h made LiquidCrystal_I2C* lcd public instead of private (like in rLiquidCrystal library), to be able to access createChar and Write in InlineC.
B4X:
public:
//~hide
LiquidCrystal_I2C* lcd;

Give a go...
 

Attachments

  • b4rhowtoliquidcrystal_i2c.zip
    8 KB · Views: 226
Upvote 0

metheoneandonly

Member
Licensed User
Longtime User
Yes, it works! Thank you very much!

One more thing: regardless of beta, I like B4R much more than original Arduino IDE, because all of boards I have (some Funduino UNO or so, Arduino Pro mini 5v 16 MHz and Arduino Due) seem to work fine. With original IDE I couldn't get Due to work as I expected, it always throws exceptions and errors because of incompatibility of libs with 32-bit CPU. With B4R I don't have such issues. I'm not yet so experienced to get the libs made for original IDE to the B4R, but as I see, it already has all I need for now. Thank you, Erel, and all people who know-how!
 
Last edited:
Upvote 0
Top