Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO and ILI9341 TFT Display Complex Graphics Generator

View and Edit Project In Cirkit DesignerImage of Arduino UNO and ILI9341 TFT Display Complex Graphics Generator

Circuit Documentation

Summary

This circuit involves an Arduino UNO microcontroller interfacing with an ILI9341 TFT display. The Arduino UNO controls the display to generate complex graphics patterns. The connections between the Arduino and the display are made through specific digital pins, and the code uploaded to the Arduino handles the initialization and drawing operations on the display.

Component List

ILI9341 TFT Display

Arduino UNO

Wiring Details

ILI9341 TFT Display

Arduino UNO

Code Documentation

Arduino UNO Code

/*
  Fingerprint - generating a complex graphics pattern with little code.

  Try changing line 27 and experimenting with the patterns, e.g.:
  tft.drawPixel(x, y, (x + y) * sin(x * y));

  https://wokwi.com/arduino/projects/307567963154678338
*/

#include <Adafruit_ILI9341.h>

#define TFT_CS   10
#define TFT_DC   9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

#define WIDTH 320
#define HEIGHT 240

void setup(void) {
  tft.begin();
  tft.setRotation(1);
}

void loop() {
  for (int y = 0; y < HEIGHT; y++) {
    for (int x = 0; x < WIDTH; x++) {
      tft.drawPixel(x, y, x * y);
    }
  }
}

This code initializes the ILI9341 TFT display and sets its rotation. In the loop function, it iterates over each pixel on the display and draws a pixel with a color value based on the product of its x and y coordinates. This creates a complex pattern on the display.