Matrix MAX7219 LED 8×8 SPI Display Module – Rød giver dig mulighed for at eksperimentere med dot matrix LED uden alle de komplicerede ledninger. Modulet bruger en MAX7219 LED-driver, der håndterer alle de komplicerede ting, såsom at multiplexere lysdioderne og køre dem ved de rigtige strømme. Derudover kan modulerne være daisy-chained (Serie forbindes) via SPI grænseflade for at fremstille større LED-skærme, mens de stadig kun kræver 3 digitale kontrolben (SPI).
Tekniske detaljer:
Resolution: 8 x 8
Display size: 32*32mm
Cascadable: Yes
Number of cascadable node: 32(MAX)
Driver IC: MAX7219
Working voltage: 4.5-5.5V
Working current: 250mA(MAX)
Interface logic voltage: 5V
Interface type: SPI
Color: Red
Installere Arduino IDE Software
Før du kan starte din programmering skal Arduino’s IDE software hentes. Dette program bruges til at programmere chippen.
Download fra dette link: Downlaod
Installere LedControl-master Library
- Download library (Download)
- Udpak filer
- Flyt/kopir mappen “LedControl-master” til “libraries” som findes i “Arduino IDE” mappen (C:/Program Files (x86)/Arduino/libraries)
- Åben Arduino IDE software og klik på “Sketch/Include library”
- Klik nu på “Add Zip. library” og find Zip filen du lige har downloaded.
- Åben “Sketch/Include library/Manage Librarys” for at opdatere library.
- Luk, og åben Arduino IDE programmet. (Genstart programmet)
- Nu er “LedControl-master” installeret
Du skal bruge:
Forbind:
VCC (Modul) – 5V (Arduino)
GND (Modul) – GND (Arduino)
DIN (Modul) – D12 (Arduino)
CS (Modul) – D11 (Arduino)
CLK (Modul) – D10 (Arduino)
Kode:
#include <LedControl.h> int DIN = 12; int CS = 11; int CLK = 10; byte e[8]= {0x7C,0x7C,0x60,0x7C,0x7C,0x60,0x7C,0x7C}; byte d[8]= {0x78,0x7C,0x66,0x66,0x66,0x66,0x7C,0x78}; byte u[8]= {0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x7E}; byte c[8]= {0x7E,0x7E,0x60,0x60,0x60,0x60,0x7E,0x7E}; byte eight[8]= {0x7E,0x7E,0x66,0x7E,0x7E,0x66,0x7E,0x7E}; byte s[8]= {0x7E,0x7C,0x60,0x7C,0x3E,0x06,0x3E,0x7E}; byte dot[8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18}; byte o[8]= {0x7E,0x7E,0x66,0x66,0x66,0x66,0x7E,0x7E}; byte m[8]= {0xE7,0xFF,0xFF,0xDB,0xDB,0xDB,0xC3,0xC3}; LedControl lc=LedControl(DIN,CLK,CS,0); void setup(){ lc.shutdown(0,false); //The MAX72XX is in power-saving mode on startup lc.setIntensity(0,15); // Set the brightness to maximum value lc.clearDisplay(0); // and clear the display } void loop(){ byte smile[8]= {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C}; byte neutral[8]= {0x3C,0x42,0xA5,0x81,0xBD,0x81,0x42,0x3C}; byte frown[8]= {0x3C,0x42,0xA5,0x81,0x99,0xA5,0x42,0x3C}; printByte(smile); delay(1000); printByte(neutral); delay(1000); printByte(frown); delay(1000); printEduc8s(); lc.clearDisplay(0); delay(1000); } void printEduc8s() { printByte(e); delay(1000); printByte(d); delay(1000); printByte(u); delay(1000); printByte(c); delay(1000); printByte(eight); delay(1000); printByte(s); delay(1000); printByte(dot); delay(1000); printByte(c); delay(1000); printByte(o); delay(1000); printByte(m); delay(1000); } void printByte(byte character []) { int i = 0; for(i=0;i<8;i++) { lc.setRow(0,i,character[i]); } }
Dot Matrix Tool:
MAX7219 chippen som styre LED dioderne styres af “Hex” tal, de skrives ind i begyndelsen af koden:
byte e[8]= {0x7C,0x7C,0x60,0x7C,0x7C,0x60,0x7C,0x7C}; byte d[8]= {0x78,0x7C,0x66,0x66,0x66,0x66,0x7C,0x78}; byte u[8]= {0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x7E}; byte c[8]= {0x7E,0x7E,0x60,0x60,0x60,0x60,0x7E,0x7E}; byte eight[8]= {0x7E,0x7E,0x66,0x7E,0x7E,0x66,0x7E,0x7E}; byte s[8]= {0x7E,0x7C,0x60,0x7C,0x3E,0x06,0x3E,0x7E}; byte dot[8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18}; byte o[8]= {0x7E,0x7E,0x66,0x66,0x66,0x66,0x7E,0x7E}; byte m[8]= {0xE7,0xFF,0xFF,0xDB,0xDB,0xDB,0xC3,0xC3};
Du kan bruge dette program til at udlæse hex coder:
Hex koden kan også laves online: Klik her
Kontakt os
Du er altid velkommen til at kontakte os på info@ardustore.dk, eller sende os en besked via messenger (Klik her) og vi vil hjælpe dig.
Anmeldelser
Der er endnu ikke nogle anmeldelser.