#include <Adafruit_ILI9341.h>
#include <SPI.h>
#define TFT_CS 10
#define TFT_DC 9
#define TFT_RST 8
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
// Define the emojis as 8x8 pixel arrays
uint8_t emojis[3][8] = {
{B00011000, B00111100, B01111110, B11011011, B11011011, B01111110, B00111100, B00011000}, // Emoji 1
{B00111100, B01000010, B10100101, B10000001, B10100101, B01000010, B00111100, B00000000}, // Emoji 2
{B00011000, B00111100, B01111110, B11111111, B11111111, B01111110, B00111100, B00011000} // Emoji 3
};
void setup() {
Serial.begin(9600);
tft.begin();
tft.setRotation(3); // Adjust the rotation if needed
}
void loop() {
// Clear the screen
tft.fillScreen(ILI9341_BLACK);
// Display larger emojis at fixed positions
displayLargeEmojis();
delay(1000); // Adjust the delay for the desired display duration
}
void displayLargeEmojis() {
int emojiWidth = 8;
int emojiHeight = 8;
int scaleFactor = 5; // Scale factor for making emojis 5 times bigger
for (int i = 0; i < 3; i++) {
// Display each enlarged emoji at a fixed position
for (int y = 0; y < emojiHeight; y++) {
for (int x = 0; x < emojiWidth; x++) {
if (emojis[i][y] & (1 << (emojiWidth - x - 1))) {
// Draw pixels for the enlarged emoji
for (int dy = 0; dy < scaleFactor; dy++) {
for (int dx = 0; dx < scaleFactor; dx++) {
tft.drawPixel(x * scaleFactor + i * 80 + dx, y * scaleFactor + dy, ILI9341_WHITE);
}
}
}
}
}
}
}