Created
October 15, 2021 13:52
-
-
Save elbruno/5ba0daccd7138aff756781046b89d85f to your computer and use it in GitHub Desktop.
WioTerminalShowImage.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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