About image size change or convert

Hi all.
the sketch below running well and shown a radical sign.
my question is how to change the radical sign size, lager or smaller?
any way resize it from code or need resize and convert again?
Thanks
Adam


#include <TFT_eSPI.h>
#include <SPI.h>

TFT_eSPI tft = TFT_eSPI();

#define BOXSIZE 34
#define BOXX    0
#define BOXY    (320-BOXSIZE*7)

  int x, y;
  int n;

  static const unsigned char PROGMEM bmp_sqrt[] = {
  B00000000, B11111111,
  B00000000, B10000000,
  B00000000, B10000000,
  B00000001, B00000000,
  B00000001, B00000000,
  B00000001, B00000000,
  B11000010, B00000000,
  B00100010, B00000000,
  B00100010, B00000000,
  B00100100, B00000000,
  B00010100, B00000000,
  B00010100, B00000000,
  B00010100, B00000000,
  B00001000, B00000000,
  B00001000, B00000000,
  B00000000, B00000000
};
  
void setup() {
  // put your setup code here, to run once:

    tft.begin();
  tft.setRotation(0);
  tft.fillScreen(TFT_RED);  // BLACK
  
 tft.drawBitmap(BOXX+x*BOXSIZE+4, BOXY+y*BOXSIZE+10, bmp_sqrt, 16, 16, ILI9341_WHITE);
}

void loop() {
  // put your main code here, to run repeatedly:

}




The extended ASCII value for the radical sign on SOME tft screens is char(250) (or \x250).

This simulator shows extended characters for ILI9341. See the 250=(radical) when you run the sketch. The character should change size as you change text size.

1 Like

GREAT.
Thank you.

I still can't shown "𝜋" by TFT_eSPI yet? any thing wrong?
I commented out Adafruit_GFX.h when use TFT_eSPI.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.