Go Down

Topic: OLED .96 inch OLED : Why can't I display a icon in bitmap 16x16 and texte at the (Read 50 times) previous topic - next topic

mariobasque

Hi to all,

With an OLED display connected to a UNO , I can do all sort of things, like gauge and text, but went it comes to display a bitmap icon (16x16) and text, only the bitmap is displayed.

const char* myStrings1[]={"Test" };
const char* myStrings2[]={"Icon"};

#define LOGO1632_GLCD_HEIGHT 16
#define LOGO1632_GLCD_WIDTH  32
static const unsigned char PROGMEM carLogo_bmp[] =
{B00000000, B00000000, B00000000, B00000000,
 B00000000, B00000000, B00000000, B00000000,
 B00000000, B01111111, B11110000, B00000000,
 B00000000, B10000010, B00001000, B00000000,
 B00000001, B00000010, B00000100, B00000000,
 B00000010, B00000010, B00000010, B00000000,
 B00000010, B00000010, B00000010, B00000000,
 B00111111, B11111111, B11111111, B11111000,
 B01000000, B00000000, B00000000, B00000100,
 B01000000, B00000000, B00000000, B00000010,
 B01000000, B00000000, B00000000, B00000010,
 B00000000, B00000000, B00000000, B00000000,
 B01111111, B11111111, B11111111, B11111100,
 B00001000, B01000000, B00000010, B00010000,
 B00000100, B10000000, B00000001, B00100000,
 B00000011, B00000000, B00000000, B11000000};


// miniature bitmap display 16x32
  x=1;
  do {
     display.clearDisplay();
     display.setTextSize(3);
     display.setCursor(2,25);
     display.println(myStrings1[menu]);
     display.setCursor(2,50);
     display.println(myStrings2[menu]);
     display.display();
     display.drawBitmap(x, 1,  carLogo_bmp, 32, 16, 1);
     display.display();
     delay(25);
  }
  while(x++ < 90);


Regards,
Mario B

Go Up