Cov txheej txheem:

Arduino Uno: Bitmap Animation ntawm ILI9341 TFT Touchscreen Display Shield Nrog Visuino: 12 Cov Kauj Ruam (nrog Duab)
Arduino Uno: Bitmap Animation ntawm ILI9341 TFT Touchscreen Display Shield Nrog Visuino: 12 Cov Kauj Ruam (nrog Duab)

Video: Arduino Uno: Bitmap Animation ntawm ILI9341 TFT Touchscreen Display Shield Nrog Visuino: 12 Cov Kauj Ruam (nrog Duab)

Video: Arduino Uno: Bitmap Animation ntawm ILI9341 TFT Touchscreen Display Shield Nrog Visuino: 12 Cov Kauj Ruam (nrog Duab)
Video: Animations on OLED display - Arduino 2024, Kaum ib hlis
Anonim
Image
Image

ILI9341 raws li TFT Touchscreen Display Shields yog nrov heev tus nqi qis Cov Ntawv Qhia rau Arduino. Visuino tau muaj kev txhawb nqa rau lawv ib ntus, tab sis kuv yeej tsis tau muaj sijhawm los sau Tutorial txog yuav siv lawv li cas. Tsis ntev los no txawm tias tsawg tus neeg nug cov lus nug txog kev siv cov lus qhia nrog Visuino, yog li kuv txiav txim siab los ua tus qhia.

Hauv Phau ntawv qhia no, kuv yuav qhia koj yooj yim npaum li cas, txuas Shield mus rau Arduino, thiab teeb tsa nws nrog Visuino kom ua kom lub ntsej muag Bitmap txav mus los ntawm Zaub.

Kauj Ruam 1: Cheeb Tsam

Txuas ILI9341 TFT Touchscreen Display Shield rau Arduino
Txuas ILI9341 TFT Touchscreen Display Shield rau Arduino
  1. Ib qho Arduino Uno tau txais lub rooj tsavxwm (Nws tuaj yeem ua haujlwm nrog Mega ib yam nkaus, tab sis kuv tseem tsis tau sim cov ntaub thaiv npog nrog nws tseem)
  2. Ib ILI9341 2.4 "TFT Touchscreen Shield rau Arduino

Kauj Ruam 2: Txuas ILI9341 TFT Touchscreen Display Shield rau Arduino

Txuas ILI9341 TFT Touchscreen Display Shield rau Arduino
Txuas ILI9341 TFT Touchscreen Display Shield rau Arduino
Txuas ILI9341 TFT Touchscreen Display Shield rau Arduino
Txuas ILI9341 TFT Touchscreen Display Shield rau Arduino

Txuas lub TFT Shield rau saum Arduino Uno raws li qhia hauv daim duab

Kauj Ruam 3: Pib Visuino thiab Ntxiv TFT Display Shield

Pib Visuino thiab Ntxiv TFT Display Shield
Pib Visuino thiab Ntxiv TFT Display Shield
Pib Visuino thiab Ntxiv TFT Display Shield
Pib Visuino thiab Ntxiv TFT Display Shield

Txhawm rau pib ua haujlwm rau Arduino, koj yuav tsum muaj Arduino IDE teeb tsa los ntawm no:

Nco ntsoov tias koj nruab 1.6.7 lossis siab dua, txwv tsis pub Cov Lus Qhia no yuav tsis ua haujlwm

Visuino: https://www.visuino.com kuj tseem yuav tsum tau teeb tsa.

  1. Pib Visuino raws li qhia hauv daim duab thawj
  2. Nyem rau ntawm "Arrow Down" khawm ntawm Arduino tivthaiv los qhib Cov Ntawv Qhia Tawm (Duab 1)
  3. Los ntawm Cov Ntawv Qhia zaub mov xaiv "Ntxiv Shields …" (Daim duab 1)
  4. Hauv "Shields" sib tham nthuav tawm "Qhia" qeb, thiab xaiv "TFT Xim Kov Screen Display ILI9341 Shield", tom qab ntawd nyem rau "+" khawm ntxiv nws (Daim duab 2)

Kauj Ruam 4: Hauv Visuino: Ntxiv Kos Cov Ntawv Rau Cov Duab Duab

Hauv Visuino: Ntxiv Kos Cov Ntawv Rau Cov Duab Duab
Hauv Visuino: Ntxiv Kos Cov Ntawv Rau Cov Duab Duab
Hauv Visuino: Ntxiv Kos Kab Lus rau Cov Duab Duab
Hauv Visuino: Ntxiv Kos Kab Lus rau Cov Duab Duab
Hauv Visuino: Ntxiv Kos Kab Lus rau Cov Duab Duab
Hauv Visuino: Ntxiv Kos Kab Lus rau Cov Duab Duab

Tom ntej no peb yuav tsum tau ntxiv Cov Duab Duab los ua cov ntawv thiab bitmap. Ua ntej peb yuav ntxiv cov duab kos los kos duab ntxoov ntxoo ntawm cov ntawv:

  1. Hauv Tus Kws Tshuaj Ntsuam Xyuas, nyem rau ntawm "…" khawm tom ntej ntawm tus nqi ntawm "Elements" cov khoom ntawm "TFT Display" Element (Daim duab 1)
  2. Hauv Elements editor xaiv "Kos Cov Ntawv", thiab tom qab ntawd nyem rau "+" khawm (Daim duab 2) ntxiv ib qho (Duab 3)
  3. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "Xim" cov khoom ntawm "Kos Text1" rau "aclSilver" (Daim duab 3)
  4. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "Qhov Loj" cov khoom ntawm "Kos Text1" lub ntsiab lus rau "4" (Daim duab 4). Qhov no ua rau cov ntawv loj dua
  5. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "Cov Ntawv" cov khoom ntawm "Kos Text1" lub ntsiab lus rau "Visuino" (Daim duab 5)
  6. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "X" cov khoom ntawm "Kos Text1" rau "43" (Daim duab 6)
  7. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "Y" cov khoom ntawm "Kos Text1" lub ntsiab lus rau "278" (Daim duab 6)

Kauj Ruam 5: Hauv Visuino: Ntxiv Kos Kab Lus rau Cov Ntawv Foreground

Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground
Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground
Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground
Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground
Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground
Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground
Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground
Hauv Visuino: Ntxiv Kos Cov Ntawv rau Element Foreground

Tam sim no peb yuav ntxiv cov duab kos los kos cov ntawv:

  1. Hauv Elements editor xaiv "Kos Cov Ntawv", thiab tom qab ntawd nyem rau "+" khawm (Daim duab 1) ntxiv thib ob (Daim duab 2)
  2. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "Qhov Loj" cov khoom ntawm "Kos Text1" lub ntsiab lus rau "4" (Daim duab 2)
  3. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "Cov Ntawv" cov khoom ntawm "Kos Text1" lub ntsiab lus rau "Visuino" (Daim duab 3)
  4. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "X" cov khoom ntawm "Kos Text1" lub ntsiab lus rau "40" (Daim duab 4)
  5. Hauv Tus Kws Tshuaj Ntsuam Xyuas teeb tsa tus nqi ntawm "Y" cov khoom ntawm "Kos Text1" lub ntsiab lus rau "275" (Daim duab 4)

Kauj Ruam 6: Hauv Visuino: Ntxiv Kos Bitmap Element rau Animation

Hauv Visuino: Ntxiv Kos Bitmap Element rau Animation
Hauv Visuino: Ntxiv Kos Bitmap Element rau Animation
Hauv Visuino: Ntxiv Kos Bitmap Element rau Animation
Hauv Visuino: Ntxiv Kos Bitmap Element rau Animation
Hauv Visuino: Ntxiv Kos Bitmap Element rau Animation
Hauv Visuino: Ntxiv Kos Bitmap Element rau Animation

Tom ntej no peb yuav ntxiv cov duab kos los kos lub bitmap:

  1. Hauv Elements editor xaiv "Kos Bitmap", thiab tom qab ntawd nyem rau "+" khawm (Daim duab 1) ntxiv ib qho (Duab 2)
  2. Hauv Tus Kws Tshuaj Ntsuam Xyuas, nyem rau "…" khawm tom ntej ntawm tus nqi "Bitmap" cov khoom ntawm "Kos Bitmap1" Element (Daim duab 2) qhib "Bitmap Editor" (Daim duab 3)
  3. Hauv "Bitmap Editor" nyem rau ntawm "Load …" khawm (Daim duab 3) kom qhib Cov Ntaub Ntawv Qhib Dialog (Daim duab 4)
  4. Hauv Cov Ntaub Ntawv Qhib Dialog, xaiv lub bitmap los kos, thiab nyem rau ntawm "Qhib" khawm (Daim duab 4). Yog tias cov ntawv loj dhau nws yuav tsis tuaj yeem haum rau hauv Arduino nco. Yog tias koj tawm ntawm kev nco yuam kev thaum ua ke, koj yuav xav xaiv me me me me
  5. Hauv "Bitmap Editor" nyem rau ntawm "OK." khawm (Daim duab 5) kom kaw qhov kev sib tham

Kauj Ruam 7: Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element

Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element
Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element
Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element
Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element
Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element
Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element
Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element
Hauv Visuino: Ntxiv Pins rau X thiab Y Cov Khoom ntawm Kos Bitmap Element

Txhawm rau ua kom lub Bitmap, peb yuav tsum tswj nws txoj haujlwm X thiab Y. Txog qhov no peb yuav ntxiv tus pin rau X thiab Y cov khoom:

  1. Hauv Tus Kws Tshuaj Ntsuam Xyuas nyem rau ntawm "Pin" khawm ntawm xub ntiag ntawm "X" cov khoom ntawm "Kos Bitmap1" ntu (Duab 1), thiab xaiv "Integer SinkPin" (Daim duab 2)
  2. Hauv Tus Kws Tshuaj Ntsuam Xyuas nyem rau ntawm "Pin" khawm nyob rau ntawm "Y" cov cuab yeej ntawm "Kos Bitmap1" ntu (Daim duab 3), thiab xaiv "Integer SinkPin" (Daim duab 4)

Kauj Ruam 8: Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Thawj Qhov Ib

Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib
Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib
Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib
Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib
Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib
Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib
Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib
Hauv Visuino: Ntxiv 2 Integer Sine Generators, thiab Kho Tus Thawj Ib

Peb yuav siv 2 Lub tshuab hluav taws xob Integer sine los ua kom lub zog txav bitmap:

  1. Ntaus "sine" hauv Lub Lim Lim ntawm Lub Cuab Yeej Cuab Yeej ntawd xaiv "Sine Integer Generator" tivthaiv (Daim duab 1), thiab tso ob qho ntawm nws tso rau hauv thaj chaw tsim.
  2. Hauv Tus Kws Tshuaj Ntsuam Xyuas, teeb tus nqi ntawm "Amplitude" cov khoom ntawm SineIntegerGenerator1 tivthaiv rau "96" (Daim duab 2)
  3. Hauv Tus Kws Tshuaj Ntsuam Xyuas, teeb tus nqi ntawm "Offset" cov khoom ntawm SineIntegerGenerator1 tivthaiv rau "96" (Daim duab 3)
  4. Hauv Tus Kws Tshuaj Ntsuam Xyuas, teeb tus nqi ntawm "Zaus" cov khoom ntawm SineIntegerGenerator1 tivthaiv rau "0.2" (Daim duab 4)

Kauj Ruam 9: Hauv Visuino: teeb tsa Tus Sine Generator Thib Ob, thiab Txuas Sine Generators rau X thiab Y Ua Haujlwm Pins ntawm Bitmap

Hauv Visuino: teeb tsa Tus Sine Generator Thib Ob, thiab Txuas Sine Generators rau X thiab Y Ua Haujlwm Pins ntawm Bitmap
Hauv Visuino: teeb tsa Tus Sine Generator Thib Ob, thiab Txuas Sine Generators rau X thiab Y Ua Haujlwm Pins ntawm Bitmap
Hauv Visuino: teeb tsa Tus Sine Generator Thib Ob, thiab Txuas Sine Generators rau X thiab Y Ua Haujlwm Pins ntawm Bitmap
Hauv Visuino: teeb tsa Tus Sine Generator Thib Ob, thiab Txuas Sine Generators rau X thiab Y Ua Haujlwm Pins ntawm Bitmap
Hauv Visuino: teeb tsa Tus Sine Generator Thib Ob, thiab Txuas Sine Generators rau X thiab Y Ua Haujlwm Pins ntawm Bitmap
Hauv Visuino: teeb tsa Tus Sine Generator Thib Ob, thiab Txuas Sine Generators rau X thiab Y Ua Haujlwm Pins ntawm Bitmap
  1. Hauv Tus Kws Tshuaj Ntsuam Xyuas, teeb tus nqi ntawm "Amplitude" cov khoom ntawm SineIntegerGenerator2 tivthaiv rau "120" (Daim duab 1)
  2. Hauv Tus Kws Tshuaj Ntsuam Xyuas, teeb tus nqi ntawm "Offset" cov khoom ntawm SineIntegerGenerator2 tivthaiv rau "120" (Daim duab 2)
  3. Hauv Tus Kws Tshuaj Ntsuam Xyuas, teeb tus nqi ntawm "Zaus" cov khoom ntawm SineIntegerGenerator2 tivthaiv rau "0.03" (Daim duab 3)
  4. Txuas tus "Tawm" tus pin tso tawm ntawm SineIntegerGenerator1 tivthaiv rau "X" tus pin nkag ntawm "Shields. TFT Sisplay. Elements. Draw Bitmap1" ntawm Arduino tivthaiv (Daim duab 4)
  5. Txuas tus "Tawm" tus pin tso tawm ntawm SineIntegerGenerator2 tivthaiv rau "Y" tus pin nkag ntawm "Shields. TFT Display. Elements. Draw Bitmap1" ntawm Arduino tivthaiv (Daim duab 5)

Kauj Ruam 10: Hauv Visuino: Ntxiv thiab Txuas Pib thiab Clock Multi Source Components

Hauv Visuino: Ntxiv thiab Txuas Pib thiab Clock Multi Source Components
Hauv Visuino: Ntxiv thiab Txuas Pib thiab Clock Multi Source Components
Hauv Visuino: Ntxiv thiab Txuas Pib thiab Clock Multi Source Components
Hauv Visuino: Ntxiv thiab Txuas Pib thiab Clock Multi Source Components
Hauv Visuino: Ntxiv thiab Txuas Pib thiab Clock Multi Source Components
Hauv Visuino: Ntxiv thiab Txuas Pib thiab Clock Multi Source Components

Txhawm rau ua qhov bitmap txhua zaus X thiab Y txoj haujlwm raug hloov kho peb yuav tsum xa lub moos teeb liab mus rau ntu "Kos Bitmap1". Txhawm rau xa cov lus txib tom qab tau hloov pauv txoj haujlwm, peb xav tau txoj hauv kev los ua cov xwm txheej. Txog qhov no peb yuav siv Rov ua ntu zus los tsim cov xwm txheej tas li, thiab Clock Multi Source los tsim 2 cov xwm txheej hauv ntu. Thawj qhov kev tshwm sim yuav teev cov tshuab hluav taws xob sine hloov kho X thiab Y txoj haujlwm, thiab qhov thib ob yuav teev cov "Kos Bitmap1":

  1. Ntaus "rov ua dua" hauv Lub Lim Lim ntawm Lub Cuab Yeej Cuab Yeej, tom qab ntawd xaiv qhov "Rov Ua Dua" ntu (Daim duab 1), thiab tso rau hauv thaj tsam tsim (Daim duab 2)
  2. Ntaus "ntau" hauv Lub Lim Lim ntawm Lub Cuab Yeej Cuab Yeej, tom qab ntawd xaiv "Clock Multi Source" tivthaiv (Daim duab 2), thiab tso rau hauv thaj tsam tsim (Duab 3)
  3. Txuas tus "Tawm" tus pin tso tawm ntawm qhov rov ua dua ntu 1 mus rau "Hauv" tus pin nkag ntawm ClockMultiSource1 tivthaiv (Daim duab 3)
  4. Txuas "Pin [0]" tus pin tso tawm ntawm "Tawm" pins ntawm ClockMultiSource1component rau "Hauv" tus pin nkag ntawm SineIntegerGenerator1 tivthaiv (Daim duab 4)
  5. Txuas "Pin [0]" tus pin tso tawm ntawm "Tawm" pins ntawm ClockMultiSource2component rau "Hauv" tus pin nkag ntawm SineIntegerGenerator1 tivthaiv (Daim duab 5)
  6. Txuas "Pin [1]" tus pin tso tawm ntawm "Clock" tus lej nkag ntawm "Shields. TFT Display. Elements. Draw Bitmap1" ntawm Arduino tivthaiv (Daim duab 6)

Kauj Ruam 11: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code

Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code
  1. Hauv Visuino, Nias F9 lossis nyem rau ntawm lub pob uas qhia ntawm daim duab 1 los tsim Arduino code, thiab qhib Arduino IDE
  2. Hauv Arduino IDE, nyem rau ntawm Upload khawm, txhawm rau sau thiab xa cov cai (Daim duab 2)

Kauj ruam 12: Thiab Ua Si …

Image
Image
Thiab Ua Si …
Thiab Ua Si …
Thiab Ua Si …
Thiab Ua Si …

Nrog koj zoo siab! Koj tau ua tiav txoj haujlwm.

Cov duab 2, 3, 4 thiab 5 thiab Daim Video qhia txog qhov txuas thiab txhawb nqa txoj haujlwm. Koj yuav pom Bitmap txav mus los ntawm ILI9341 raws li TFT Touchscreen Display Shield raws li pom hauv Video.

Ntawm daim duab 1 koj tuaj yeem pom daim duab Visuino ua tiav. Qhov txuas nrog yog Visuino qhov haujlwm, uas kuv tau tsim rau qhov Qhia Qhia, thiab cov duab me me nrog Visuino lub logo. Koj tuaj yeem rub tawm thiab qhib nws hauv Visuino:

Pom zoo: