#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library for ILI9341
#include <SPI.h>
#include "dog.h" // Include your image header file
// Define pins for the ILI9341 display
#define TFT_DC 2
#define TFT_CS 15
#define TFT_RST 4 // Optional reset pin (use -1 if not needed)
// Create an instance of the ILI9341 display
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup() {
// Initialize the display
tft.begin();
// Set rotation (optional: 0-3)
tft.setRotation(1); // Adjust based on your orientation preference
// Clear the screen
tft.fillScreen(ILI9341_BLACK);
// Draw the image from dog.h onto the screen
tft.drawRGBBitmap(0, 0, dog, 240, 196); // Assuming image is 240x320 pixels
}
void loop() {
// Nothing to do here
}