Cov txheej txheem:

Arduino Max7219 Led Matrix Display Tutorial: 4 Cov Kauj Ruam
Arduino Max7219 Led Matrix Display Tutorial: 4 Cov Kauj Ruam

Video: Arduino Max7219 Led Matrix Display Tutorial: 4 Cov Kauj Ruam

Video: Arduino Max7219 Led Matrix Display Tutorial: 4 Cov Kauj Ruam
Video: MAX7219 Dot Matrix 4-in-1 Display with Arduino - Scrolling Text & Displaying Sensor Data 2024, Hlis ntuj nqeg
Anonim
Arduino Max7219 Led Matrix Zaub Qhia
Arduino Max7219 Led Matrix Zaub Qhia

Nyob zoo cov neeg hauv phau ntawv qhia no peb yuav kawm paub siv coj cov duab matrix nrog max7219 zaub tsav nrog Arduino los tso saib cov duab thiab cov ntawv ntawm qhov coj Matrix zaub.

Kauj Ruam 1: Yam Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau

Rau cov lus qhia no peb yuav xav tau cov khoom hauv qab no: Arduino unoLed Matrix zaub nrog max7219Jumper xov hlau Breadboard

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas

Ua ntej peb nkag mus rau txhua qhov no peb yuav tsum txuas txhua yam ua ke raws li qhov qhia tau schmatics hauv daim duab.

Kauj Ruam 3: Coding Tshooj

Coding Tshooj
Coding Tshooj

koj yuav tsum rub tawm thiab teeb tsa hauv koj li Arduino IDE lub tsev qiv ntawv LedControl. Txhawm rau teeb tsa lub tsev qiv ntawv ua raws cov theem hauv qab no: Nyem rau qhov no txhawm rau rub lub tsev qiv ntawv LedControl:

Koj yuav tsum muaj.zip nplaub tshev hauv koj DownloadsUnzip lub.zip nplaub tshev thiab koj yuav tsum tau txais LedControl-master nplaub tshev Hloov koj lub nplaub tshev los ntawm LedControl-master rau LedControl Txav lub LedControl nplaub tshev rau koj Arduino IDE teeb tsa lub tsev qiv ntawv nplaub tshev kawg, rov qhib koj li Arduino IDEUs siv LedControl lub tsev qiv ntawv. Txoj hauv kev yooj yim tshaj plaws los tso saib qee yam ntawm dot matrix yog los ntawm kev siv cov haujlwm setLed (), setRow () lossis setColumn (). Cov haujlwm no tso cai rau koj los tswj ib tus coj, ib kab lossis ib kab hauv ib lub sijhawm. Ntawm no yog qhov ntsuas rau txhua txoj haujlwm: setLed (ntxiv, kab, col, xeev) ntxiv yog qhov chaw nyob ntawm koj tus lej, piv txwv li, yog tias koj muaj tsuas yog 1 tus lej, tus int ntxiv yuav yog xoom.row yog kab uas tus coj nyob hauv col yog kab ntawv uas tus coj nyob ntawm lub xeev Nws yog qhov tseeb lossis 1 yog tias koj xav tig lub coj ntawm nws tsis raug lossis 0 yog tias koj xav hloov nws offsetRow (addr, kab, tus nqi) setCol (addr, kem, tus nqi) Luam cov cai hauv qab no & Upload nws rau koj pawg thawj coj: #include "LedControl.h" #include "binary.h"/* DIN txuas rau tus pin 12 CLK txuas rau tus pin 11 CS txuas rau tus pin 10 */LedControl lc = LedControl (12, 11, 10, 1); // ncua sijhawm nruab nrab ntawm lub ntsej muag tsis pom kev ncua sijhawm ntev = 1000; // zoo siab facebyte hf [8] = {B00111100, B01000010, B10100101, B10000001, B10100101, B10011001, B01000010, B00111100}; // nruab nrab facebyte nf [8] = {B00111100, B01000010, B10100101, B10000001, B10111101, B10000001, B01000010, B00111100}; // sad facebytef [8] = {B00111100, B01000010, B10100101, B10000001, B10011001, B10100101, B01000010, B00111100}; void setup () {lc.shutdown (0, tsis tseeb); // Teeb ci ci rau tus nqi nruab nrab lc.setIntensity (0, 8); // Tshem cov zaub lc.clearDisplay (0); } tsis muaj dabtsis drawFaces () {// Tso lub ntsej muag tu siab lc.setRow (0, 0, sf [0]); lc.setRow (0, 1, sf [1]); lc.setRow (0, 2, sf [2]); lc.setRow (0, 3, sf [3]); lc.setRow (0, 4, sf [4]); lc.setRow (0, 5, sf [5]); lc.setRow (0, 6, sf [6]); lc.setRow (0, 7, sf [7]); ncua (ncua sijhawm); // Zaub nruab nrab lub ntsej muag lc.setRow (0, 0, nf [0]); lc.setRow (0, 1, nf [1]); lc.setRow (0, 2, nf [2]); lc.setRow (0, 3, nf [3]); lc.setRow (0, 4, nf [4]); lc.setRow (0, 5, nf [5]); lc.setRow (0, 6, nf [6]); lc.setRow (0, 7, nf [7]); ncua (ncua sijhawm); // Tso lub ntsej muag zoo siab lc.setRow (0, 0, hf [0]); lc.setRow (0, 1, hf [1]); lc.setRow (0, 2, hf [2]); lc.setRow (0, 3, hf [3]); lc.setRow (0, 4, hf [4]); lc.setRow (0, 5, hf [5]); lc.setRow (0, 6, hf [6]); lc.setRow (0, 7, hf [7]); ncua (ncua sijhawm);} void loop () {drawFaces ();}

Kauj Ruam 4: Tso Tawm

Tso zis
Tso zis
Tso zis
Tso zis

Tom qab txuas txhua yam ua ke thiab xa cov cai rau arduino koj tuaj yeem pom qhov luag ntxhi zoo li kuv cov duab pom hauv daim duab.

Pom zoo: