You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.3 KiB
87 lines
2.3 KiB
|
|
//************************************************************************************************
|
|
void drawBitmaps1()
|
|
{
|
|
display.setRotation(1);
|
|
display.setFullWindow();
|
|
const unsigned char* bitmaps[] =
|
|
{
|
|
//logo200x200
|
|
//eighth200x200
|
|
// senventh200x200
|
|
termom200x200
|
|
};
|
|
uint8_t box_x = 50;
|
|
uint8_t box_y = 50;
|
|
uint8_t box_w = 110;
|
|
uint8_t box_h = 70;
|
|
//Serial.println("helloWorld");
|
|
//display.setRotation(1);
|
|
//display.setFont(&FreeMonoBold9pt7b);
|
|
//E:\ARDUINO\Sketch\arduino-1.8.2\libraries\GxEPD2\src\bitmaps
|
|
|
|
u8g2Fonts.setFontMode(1); // use u8g2 transparent mode (this is default)
|
|
u8g2Fonts.setFontDirection(0); // left to right (this is default)
|
|
u8g2Fonts.setForegroundColor(GxEPD_BLACK); // apply Adafruit GFX color
|
|
u8g2Fonts.setBackgroundColor(GxEPD_WHITE); // apply Adafruit GFX color
|
|
|
|
|
|
if ((display.epd2.WIDTH == 200) && (display.epd2.HEIGHT == 200) && !display.epd2.hasColor)
|
|
{
|
|
// bool m = display.mirror(true);
|
|
for (uint16_t i = 0; i < sizeof(bitmaps) / sizeof(char*); i++)
|
|
{
|
|
display.firstPage();
|
|
do
|
|
{
|
|
display.fillScreen(GxEPD_WHITE);
|
|
display.drawInvertedBitmap(0, 0, bitmaps[i], 200, 200, GxEPD_BLACK);
|
|
|
|
|
|
u8g2Fonts.setFont(u8g2_font_fub49_tn);
|
|
display.setCursor(box_x, box_y);
|
|
u8g2Fonts.setCursor(box_x, box_y+55);
|
|
u8g2Fonts.print(tc);
|
|
u8g2Fonts.print(".");
|
|
u8g2Fonts.setFont(u8g2_font_fub30_tn);//++11.14.17.20.25.30.35.42.49
|
|
u8g2Fonts.setCursor(box_x+80+15, box_y+55);
|
|
u8g2Fonts.print(td);
|
|
//u8g2Fonts.setFont(u8g2_font_fur30_tn);//++11.14.17.20.25.30.35.42.49
|
|
u8g2Fonts.setCursor(box_x+10, box_y+130);
|
|
u8g2Fonts.print(hc);
|
|
u8g2Fonts.print(".");
|
|
u8g2Fonts.print(hd);
|
|
|
|
u8g2Fonts.setFont(u8g2_font_fub11_t_symbol);//++
|
|
|
|
|
|
u8g2Fonts.setCursor(75, 15);
|
|
u8g2Fonts.print(vc);
|
|
u8g2Fonts.print(".");
|
|
if(vd<10)
|
|
{u8g2Fonts.print("0");
|
|
u8g2Fonts.print(vd);
|
|
}
|
|
else
|
|
{
|
|
u8g2Fonts.print(vd);
|
|
}
|
|
|
|
int v=vc*100+vd;
|
|
if(v<280)
|
|
{v=280;
|
|
}
|
|
box_w=2+(v-280)/5;
|
|
if(box_w > 27)
|
|
{box_w = 27;
|
|
}
|
|
display.fillRect(18,6, box_w, 17, GxEPD_BLACK);
|
|
|
|
|
|
}
|
|
while (display.nextPage());
|
|
delay(2000);
|
|
}
|
|
//display.mirror(m);
|
|
}
|
|
}
|
|
|