Bienvenido a los foros de FT81x Manía. Te invitamos a regístrate totalmente gratis. Disfruta de tu experiencia con un grandes amigos y Staff.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Thread Contributor: raufjayFT811 Degree ° symbol

#1
0
Hello again,

Is there any possibility to print Degree ' ° ' symbol on FT811 display?  Its ascii value is 248. Or shall I have to play with DOT command.

Thanks,

Rauf
Reply
#2
2
Better response on post RE: FT811 Degree ° symbolWell, the gameduino 2/3 library is at certain point, something basic, but their power it is amazing. Try this sketch:

float Data = 2225.856892;

void setup()
{
  GD.begin();
  MP();
}
void loop(){} //nothing to do here!

void MP()
{
  while(1)
  {
    GD.ClearColorRGB(0x000055);
    GD.Clear();
    //Grade(X position, Y position, float number, Font Size, character);
      Grade(250, 100, Data, 31, "K");
      Grade(250, 180, Data, 32, "R");
      Grade(250, 300, Data, 34, "C");
    GD.swap();
  }
}

void Grade(int PX, int PY, float Dat, int Size, const char CHR[])
{
 if (Size >=32)
 {
  if(Size==34)
  {
    GD.cmd_romfont(15,Size);
    GD.printNfloat(PX, PY, Dat, 1, 15); 
    GD.cmd_text(PX+(35+Size*.8), PY, 31, 0, "o");
    GD.cmd_text(PX+(47+Size), PY, 15, 0, CHR);
  }else{
    GD.cmd_romfont(15,Size);
    GD.printNfloat(PX, PY, Dat, 1, 15); 
    GD.cmd_text(PX+(35+Size*.25), PY, Size-2, 0, "o");
    GD.cmd_text(PX+(47+Size*.5), PY, 15, 0, CHR);
  }
  }else{
  GD.printNfloat(PX, PY, Dat, 1, Size); 
  GD.cmd_text(PX+(35-Size*.11), PY, Size-2, 0, "o");
  GD.cmd_text(PX+(47-Size*.11), PY, Size, 0, CHR);
 }
}
?mage
?mage
?mage
TFT: 5" FT813 Newhaven Display
MCU: Nucleo F767ZI
Reply
#3
0
Hello,
Thank you for your nice reply. I always learn more on your every reply. You are very knowledgeable. I am happy to get in touch with you.

I have a question, what character or ascii value you used to type "o". it is not ascii 248.

Thanks,

Rauf
Reply
#4
1
I believe to be a "o" lowercase, this line;

GD.cmd_text(PX+(35+Size*.25), PY, Size-2, 0, "o");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)