Cov txheej txheem:

Arduino Smile MAX7219 Matrix LED Tutorial: 4 Cov Kauj Ruam
Arduino Smile MAX7219 Matrix LED Tutorial: 4 Cov Kauj Ruam

Video: Arduino Smile MAX7219 Matrix LED Tutorial: 4 Cov Kauj Ruam

Video: Arduino Smile MAX7219 Matrix LED Tutorial: 4 Cov Kauj Ruam
Video: Arduino LED matrix 8X8 display MAX7219 || LED EMOJI Display 2024, Hlis ntuj nqeg
Anonim
Arduino Smile MAX7219 Matrix LED Tutorial
Arduino Smile MAX7219 Matrix LED Tutorial

Hauv qhov kev qhia no "Kev tswj hwm Led Matrix Siv Arduino". Kuv qhia koj yuav siv Led matrix display siv Arduino li cas.

Thiab hauv kab lus no, peb yuav kawm ua kom luag nyav emoticons siv qhov matrix zaub siv Arduino ib yam.

Cov khoom xyaw siv tseem zoo ib yam li tsab xov xwm dhau los. yog li tam sim no peb pib qhia.

Kauj Ruam 1: Yuav Tsum Muaj Kev Koom Tes

Yuav tsum muaj Cheeb Tsam
Yuav tsum muaj Cheeb Tsam
Yuav tsum muaj Cheeb Tsam
Yuav tsum muaj Cheeb Tsam
Yuav tsum muaj Cheeb Tsam
Yuav tsum muaj Cheeb Tsam
Yuav tsum muaj Cheeb Tsam
Yuav tsum muaj Cheeb Tsam

Nov yog cov npe ntawm cov khoom siv xav tau:

  • Coj Matrik
  • Arduino Nano Cov
  • Jumper Hlau
  • USBmini
  • Pawg Thawj Coj

Yuav tsum muaj tsev qiv ntawv:

LedControl

Kauj ruam 2: Scheme

Txheej txheem
Txheej txheem
Txheej txheem
Txheej txheem

Txhawm rau sib sau ua ke pom cov duab kos duab saum toj no, koj tuaj yeem pom cov ntaub ntawv hauv qab no:

Coj Matrix rau Arduino

VCC ==> +5V

GND ==> GND

DIN ==> D6

CS ==> D7

CLK ==> D8

Tom qab ua tiav kev sib dhos ua ke, npaj mus rau txheej txheem txheej txheem.

Kauj ruam 3: Programming

Programming
Programming

Siv cov cai hauv qab no los ua lub ntsej muag luag ntxhi hauv dot matrix:

#suav nrog "LedControl.h"

/*

Tam sim no peb xav tau LedControl los ua haujlwm nrog. ***** Cov lej tus lej no tej zaum yuav tsis ua haujlwm nrog koj lub khoos phis tawj ***** tus pin 6 txuas nrog rau DataIn tus pin 8 txuas nrog CLK tus pin 7 txuas nrog LOAD Peb tsuas muaj ib qho MAX72XX nkaus xwb. */

LedControl lc = LedControl (6, 7, 8, 1);

unsigned ntev ncua sijhawm = 100;

void teeb tsa () {

lc.shutdown (0, tsis tseeb); lc.setIntensity (0, 8); lc.clearDisplay (0); }

luag ntxhi luag ntxhi () {

byte a [8] = {B00000000, B01100110, B01100110, B00000000, B00000000, B01000010, B00111100, B00000000};

lc.setRow (0, 0, a [0]);

lc.setRow (0, 1, a [1]); lc.setRow (0, 2, a [2]); lc.setRow (0, 3, a [3]); lc.setRow (0, 4, a [4]); lc.setRow (0, 5, a [5]); lc.setRow (0, 6, a [6]); lc.setRow (0, 7, a [7]); }

void voj () {

luag (); }

Kauj Ruam 4: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim

Txog qhov txiaj ntsig tuaj yeem pom hauv daim duab saum toj no.

Pom zoo: