B4R Question Use Globalstore in inline C


Well-Known Member
Licensed User
Longtime User

Globalstore can be easily used from b4r. I tried to use it in in line C but I could not do it.
What I want to do is convert a number to char and add it in GlobalStore. Any help will be highly appreciated. Here is what I have got so far:

#if C
void trial(B4R::Object* o) {
    ULong num = (o->toULong());
    char _texttodisplay;
    _texttodisplay = (char) num;
    B4R::B4RString _ttds;
    //This line does not work (it requires a B4R::Array*)
    //b4r_main::_globalstore->_put (2,(_ttds)->GetBytes());
#End If


Well-Known Member
Licensed User
Longtime User
I am trying to display native Greek Characters (like Γ-Gamma or Δ-Delta - Not common with english letters) in an LCD 1602 screen.

I have done it in tinkercad but I cannot transfer the code. Press the code button.

(Link is valid until 5/5/2021)

I was planning to pass the char to a slot and print it then with lcd.write(Globalstore.Slot0) - I thought (char) was casting to a character.

Edit - Would this be the answer?

Private Sub PrintNativeGRLetter(num As UInt)
    Dim b As Byte = num
    lcd.Write(Array As Byte(b))
End Sub
Last edited:
Upvote 0