Skip to content

Instantly share code, notes, and snippets.

@elbruno
Created October 15, 2021 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elbruno/5ba0daccd7138aff756781046b89d85f to your computer and use it in GitHub Desktop.
Save elbruno/5ba0daccd7138aff756781046b89d85f to your computer and use it in GitHub Desktop.
WioTerminalShowImage.cpp
// Bruno Capuano 2021
// http://elbruno.com
#include"TFT_eSPI.h"
#include"Free_Fonts.h" //include the header file
#include "Seeed_FS.h" //Including SD card library
#include"RawImage.h" //Including image processing library
TFT_eSPI tft;
int counter = 5;
void setup() {
//Initialise SD card
if (!SD.begin(SDCARD_SS_PIN, SDCARD_SPI)) {
while (1);
}
tft.begin();
tft.setRotation(3);
tft.fillScreen(TFT_BLACK); //Black background
tft.setFreeFont(FS12);
}
void loop() {
if(counter == 0)
{
drawImage<uint8_t>("bruno.bmp", 0, 0);
tft.drawString("@elbruno",10,200);
}
else if(counter > 0)
{
counter--;
tft.drawString("Bruno show in ...",75,100);
tft.drawString(String(counter),75,125);
tft.drawString("seconds",100,125);
}
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment