Codey OnlineArduino- & ESP32-componentenbibliotheek › 3.5 inch TFT LCD Shield
3.5 inch TFT LCD Shield
Sensoren

3.5 inch TFT LCD Shield

3,5 inch TFT LCD shield voor Arduino UNO en MEGA

Breedte: 108.9 mm

Pinout — 3.5 inch TFT LCD Shield

Pin Signaal Beschrijving
LCD_D2 data Parallel TFT LCD data bus bit 2 from the Arduino to the display controller.
LCD_D3 data Parallel TFT LCD data bus bit 3 from the Arduino to the display controller.
LCD_D4 data Parallel TFT LCD data bus bit 4 from the Arduino to the display controller.
LCD_D5 data Parallel TFT LCD data bus bit 5 from the Arduino to the display controller.
LCD_D6 data Parallel TFT LCD data bus bit 6 from the Arduino to the display controller.
LCD_D7 data Parallel TFT LCD data bus bit 7 from the Arduino to the display controller.
LCD_D0 data Parallel TFT LCD data bus bit 0 from the Arduino to the display controller.
LCD_D1 data Parallel TFT LCD data bus bit 1 from the Arduino to the display controller.
SD_SS chip-select MicroSD SPI slave-select/chip-select line; active low to select the card.
SD_DI MOSI MicroSD SPI data-in line; Arduino MOSI into the card.
SD_DO MISO MicroSD SPI data-out line; card MISO back to the Arduino.
SD_SCK SCK MicroSD SPI serial clock from the Arduino to the card.
LCD_CS chip-select TFT LCD chip-select input; active low to enable LCD command/data transfers.
LCD_RS digital TFT LCD register-select/data-command control line for the parallel interface.
LCD_WR clock TFT LCD write strobe; clocks Arduino data into the display controller.
LCD_RD clock TFT LCD read strobe; used when reading display controller data/status.
GND ground Ground reference for the LCD shield, microSD socket, and Arduino signals.
5V power 5 V supply input from the Arduino used to power the TFT shield circuitry.
3V3 power 3.3 V supply rail used by low-voltage shield circuitry such as the microSD interface.
J4.4 power Unlabeled power-side header contact passed through to the Arduino shield stack.
J4.5 power Unlabeled power-side header contact passed through to the Arduino shield stack.
J4.6 power Unlabeled power-side header contact passed through to the Arduino shield stack.
LCD_RST reset TFT LCD Reset

Voorbeeld-aansluitschema — 3.5 inch TFT LCD Shield

Van Naar Draad
board:GND x1:GND black
board:5V x1:5V red
board:3.3V x1:3V3 darkorange
board:D2 x1:LCD_D2 green
board:D3 x1:LCD_D3 blue
board:D4 x1:LCD_D4 yellow
board:D5 x1:LCD_D5 purple
board:D6 x1:LCD_D6 cyan
board:D7 x1:LCD_D7 magenta
board:D8 x1:LCD_D0 brown
board:D9 x1:LCD_D1 pink
board:D10 x1:SD_SS teal
board:D11 x1:SD_DI lime
board:D12 x1:SD_DO green
board:D13 x1:SD_SCK blue
board:A0 x1:LCD_CS yellow
board:A1 x1:LCD_RS purple
board:A2 x1:LCD_WR cyan
board:A3 x1:LCD_RD magenta
board:A4 x1:LCD_RST brown

Voorbeeld-Arduinocode — 3.5 inch TFT LCD Shield

Dit voorbeeld is geschreven en compile-gecheckt voor de arduino-uno. Codey Online past het voor je aan naar elk ander ondersteund board.

#include <SPI.h>
#include <SD.h>

// Canonical beginner sketch for a 3.5 inch TFT LCD Shield wired to an Arduino Uno.
// This example demonstrates using the microSD slot with the built-in SD library.
// The TFT control/data pins are shown in the wiring block, but the sketch keeps the
// example simple by focusing on the shield's SD card interface.

const uint8_t SD_CS_PIN = 10;

void printDirectory(File dir, int numTabs) {
  while (true) {
    File entry = dir.openNextFile();
    if (!entry) {
      break;
    }

    for (int i = 0; i < numTabs; i++) {
      Serial.print('\t');
    }
    Serial.print(entry.name());
    if (entry.isDirectory()) {
      Serial.println('/');
      printDirectory(entry, numTabs + 1);
    } else {
      Serial.print('\t');
      Serial.println(entry.size(), DEC);
    }
    entry.close();
  }
}

void setup() {
  Serial.begin(9600);
  while (!Serial) {
    ;
  }

  Serial.println(F("3.5 inch TFT LCD Shield - SD card example"));
  Serial.print(F("Initializing SD card on CS pin D"));
  Serial.println(SD_CS_PIN);

  if (!SD.begin(SD_CS_PIN)) {
    Serial.println(F("SD card initialization failed!"));
    Serial.println(F("Check power, wiring, and that a card is inserted."));
    while (true) {
      delay(1000);
    }
  }

  Serial.println(F("SD card initialized successfully."));

  File root = SD.open("/");
  if (root) {
    Serial.println(F("Files on the card:"));
    printDirectory(root, 0);
    root.close();
  } else {
    Serial.println(F("Could not open root directory."));
  }
}

void loop() {
  // Nothing to do here for this basic example.
  delay(1000);
}

Vergelijkbare componenten

18650 Battery Shield with USB-C Charger and 5V Boost Converter

18650 Battery Shield with USB-C Charger and 5V Boost Converter

2.4 inch OLED Display I2C 3.3V

2.4 inch OLED Display I2C 3.3V

50kg Load Cell Weight Sensor

50kg Load Cell Weight Sensor

Accelerometer and Gyroscope I2C MPU-6050

Accelerometer and Gyroscope I2C MPU-6050

Bouw je Arduino- of ESP32-project met AI

Beschrijf wat je wilt bouwen. Codey Online schrijft de code, tekent het aansluitschema, compileert het en flasht je board rechtstreeks vanuit de browser.

Gratis starten