Cov txheej txheem:

Arduino TFT Graphics Shield: 4 Kauj Ruam (nrog Duab)
Arduino TFT Graphics Shield: 4 Kauj Ruam (nrog Duab)

Video: Arduino TFT Graphics Shield: 4 Kauj Ruam (nrog Duab)

Video: Arduino TFT Graphics Shield: 4 Kauj Ruam (nrog Duab)
Video: 2.4'' TFT LCD Shield Menu Option Arduino 2024, Kaum ib hlis
Anonim
Image
Image
Daim duab thaiv
Daim duab thaiv

Cov lus qhia no piav qhia yuav ua li cas thiaj ua tau 240 x 320 pixel (QVGA) xim daim duab thaiv rau koj Arduino UNO R3.

Cov ntaub thaiv npog, uas yog lub tsheb npav SPI thiab ILI9341 cov khoom siv saib xyuas, ntsaws ncaj qha rau koj Arduino.

Tsuas yog 5 Arduino cov ntaub ntawv pins tau siv uas tawm ntawm lwm tus pin dawb rau koj cov phiaj xwm.

Cov zaub TFT yog qhov ntev ib yam li koj li Arduino uas ua rau pob khoom huv si.

Daim ntaub thaiv:

  • tshem tawm qhov xav tau rau cov kab hluav taws xob.
  • muab qhov ruaj khov rau cov zaub
  • muaj qhov tsim nyog 5 volt txog 3 volt qhov faib hluav taws xob
  • tuaj yeem raug teeb tsa nyob rau sab saum toj ntawm lwm cov ntaub thaiv npog Arduino

Tus nqi kwv yees ntawm ib feem yog tsawg dua $ 20

Duab

Daim duab 1 qhia txog Arduino daim ntaub thaiv hluav taws xob.

Cov vis dis aus qhia txog daim thaiv npog TFT hauv kev nqis tes ua.

Kauj Ruam 1: Daim Ntawv Teev Npe

Cov hauv qab no tau txais los ntawm

  • 1 tsuas yog 2.2 Ntiag TFT SPI LCD Zaub Module 240*320 ILI9341 nrog SD Card Qhov rau Arduino Raspberry Pi 51/AVR/STM32/ARM/PIC [1]
  • 1 tsuas yog Tsab Ntawv Tshaj Tawm PCB nthuav dav rau Arduino ATMEGA328P UNO R3 Shield FR-4 Fiber PCB Breadboard 2mm 2.54mm Suab

Cov hauv qab no tau txais hauv zos:

  • 5 tsuas yog 2K2 ohm 1/8 watt hlau zaj duab xis resistors
  • 5 tsuas yog 3k3 ohm 1/8 watt hlau zaj duab xis resistors
  • 1 tsuas yog 40 tus pin header davhlau ya nyob twg sawb 0.1 "/2.54mm suab rau PCBs
  • 10 amp tinned tooj liab fuse xaim

Tus nqi kwv yees ntawm ib feem yog tsawg dua $ 20

Kauj Ruam 2: Daim Kab Xaim

Daim duab thaiv
Daim duab thaiv
Daim duab thaiv
Daim duab thaiv

TFT module lees paub 5 volts, vim nws muaj 3 volt tus tswj hluav taws xob, tab sis txhua qhov TFT cov tswv yim xav tau 3 volts.

2K2 | 3K3 qhov faib hluav taws xob txo Arduino 5 volt tso tawm mus rau 3 volts.

Duab

  • Daim duab 1 qhia txog daim duab kab hluav taws xob TFT.
  • Daim duab 2 qhia txog daim thaiv thaiv
  • Daim duab 3 qhia txog daim thaiv npog hauv qab
  • Daim duab 4 qhia yog saib sab saum toj ntawm daim ntaub thaiv
  • Daim duab 5 qhia txog chav sib dhos

Kev Xeem

  • Tshem lub TFT zaub los ntawm daim ntaub thaiv
  • Ntxig daim ntaub thaiv rau hauv koj Arduino
  • Txuas koj Arduino rau hauv koj lub computer
  • Txheeb xyuas tias txhua qhov kev faib hluav taws xob sib cais ntsuas 3 volts.
  • Tshem tawm Arduino ntawm koj lub computer
  • Plug rau hauv TFT zaub
  • Tam sim no koj npaj txhij mus.

Kauj ruam 3: Software

Yuav tsum muaj peb lub tsev qiv ntawv cov ntaub ntawv ntxiv nrog rau cov lej txuas

Kauj ruam 1

Rub tawm cov ntawv qiv hauv qab no:

  • https://github.com/adafruit/Adafruit_ILI9341
  • https://github.com/adafruit/Adafruit-GFX-Library
  • https://github.com/adafruit/Adafruit_BusIO

Txhua ntawm cov ntaub ntawv saum toj no yog nyob rau hauv zip hom thiab yuav tshwm nyob rau hauv koj cov ntawv tais ceev tseg

Kauj ruam 2

Xaiv thiab teeb tsa txhua lub tsev qiv ntawv saum toj no siv koj Arduino IDE:

  • Nyem "Sketch | Suav nrog Tsev Qiv Ntawv | Ntxiv Zip Library… | Adafruit_ILI9341-master.zip”
  • Nyem "Sketch | Suav nrog Tsev Qiv Ntawv | Ntxiv Zip Library… | Adafruit-GFX-Library-master.zip”
  • Nyem "Sketch | Suav nrog Tsev Qiv Ntawv | Ntxiv Zip Library… | Adafruit_BusIO-master.zip”

Kauj ruam 3

Los ntawm koj Arduino IDE:

  • Luam cov ntawv txuas "graphicstest2.ino" txuas rau Arduino kos duab [1]
  • Txuag cov duab kos ua "graphicstest2" tom qab ntawv rub nws mus rau koj Arduino

Nco tseg

[1]

Cov ntsiab lus ntawm "graphicstest2.ino" zoo ib yam rau lub tsev qiv ntawv piv txwv cov ntaub ntawv "… | Arduino | qiv | Adafruit_ILI9341-tus tswv | piv txwv | graphicstest | graphicstest.ino”tshwj tsis yog tias qee qhov tso saib ntxiv cov pins tau teev tseg hauv kab ntawv.

Cov cai rau Daim Npav Duab kuj tseem suav nrog.

Kauj ruam 4: Cov ntsiab lus

Cov lus qhia piav qhia yuav ua li cas thiaj ua daim npog TFT rau koj Arduino Uno R3

Display size is 320 x 240 pixels (QVGA)

SPI daim ntaub thaiv ntsaws ncaj qha rau koj Arduino

Tsuas yog 5 tus pin cov ntaub ntawv Arduino xav tau

Cov zaub TFT yog qhov ntev ib yam li koj Arduino uas ua rau pob ntim huv si.

Tus nqi kwv yees ntawm cov khoom yog $ 20

Nyem qhov no mus saib kuv lwm cov ntawv qhia.

Pom zoo: