Cekidooot...
Interface Arduino dengan tiga modul Max7219
Download Library LedControl
Download File Proteus + Hex
Copy Paste Sketch dibawah ini di Arduino IDE,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LedControl.h> | |
const int JUMLAH_MAX7219 = 3; | |
const int JUMLAH_DIGIT = 8; | |
const int PIN_CS = 10; | |
const int PIN_CLK = 9; | |
const int PIN_DIN = 8; | |
LedControl lc= LedControl (PIN_DIN,PIN_CLK, PIN_CS, JUMLAH_MAX7219); | |
void tampil_hello() | |
{ | |
lc.setChar(0,7,'-',false); | |
lc.setChar(0,6,'H',false); | |
lc.setChar(0,5,'E',false); | |
lc.setChar(0,4,'L',false); | |
lc.setChar(0,3,'L',false); | |
lc.setChar(0,2,'0',false); | |
lc.setChar(0,1,'0',false); | |
lc.setChar(0,0,'-',false); | |
} | |
void tampil_faeyza() | |
{ | |
lc.setChar(1,6,'F',false); | |
lc.setRow(1,5,0x7d); | |
lc.setRow(1,4,0x6f); | |
lc.setRow(1,3,0x3b); | |
lc.setRow(1,2,0x6d); | |
lc.setRow(1,1,0x7d); | |
} | |
void tampil_arduino() | |
{ | |
lc.setChar(2,7,'A',false); | |
lc.setRow(2,6,0x05); | |
lc.setRow(2,5,0x3d); | |
lc.setRow(2,4,0x1c); | |
lc.setRow(2,3,0x10); | |
lc.setRow(2,2,0x15); | |
lc.setRow(2,1,0x1d); | |
} | |
void setup() { | |
// put your setup code here, to run once: | |
unsigned char i,j; | |
for(j=0;j<JUMLAH_MAX7219;j++) | |
{ | |
for(i=0;i<=JUMLAH_DIGIT;i++) | |
{ | |
lc.shutdown(i,false); | |
lc.setIntensity(i,15); | |
lc.clearDisplay(i); | |
} | |
} | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
tampil_hello(); | |
tampil_faeyza(); | |
tampil_arduino(); | |
} |
Post a Comment for "Cara Menampilkan Karakter Text di Modul MAX7219 Seven Segment lebih dari satu modul ( Arduino )"
Komentar hanya untuk yang baik-baik dan tidak spam