HDDKullanıyorum
Hectopat
- Katılım
- 7 Şubat 2021
- Mesajlar
- 840
- Çözümler
- 2
Daha fazla
- Cinsiyet
- Erkek
Öncelikle merhaba. bir LED matrix projesi ile uğraşıyorum (Max7219) ancak kodumda bir hata alıyorum. kodu aşağıda paylaşacağım inceleyip hatayı söyleyebilirseniz sevinirim.
Kod ;
#include <LedControl.h>
int DIN = 4;
int CS = 5;
int CLK = 6;
LedControl lc=LedControl(DIN,CLK,CS,0);
void setup(){
lc.shutdown(0,false);
lc.setIntensity(0,12);
lc.clearDisplay(0);
}
void loop(){
byte a[8] = (0x00,0x3F,0x54,0x54,0x15,0x26,0x00,0x00);
byte b[8] = (0x00,0x38,0x08,0x38,0x08,0x38,0x00,0x00);
byte c[8] = (0x00,0x68,0x2C,0x2E,0x24,0x00,0x00,0x00);
byte d[8] = (0x00,0x6C,0x28,0x2E,0x22,0x2E,0x00,0x00);
byte e[8] = (0x00,0x37,0x31,0x17,0x54,0x76,0x00,0x00);
byte f[8] = (0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00);
printebyte a;
delay(4);
printebyte b;
delay(4);
printebyte c;
delay(4);
printebyte d;
delay(4);
printebyte e;
delay(4);
printebyte f;
delay(4);
printEduc8s();
lc.clearDisplay(0);
delay(1000);
}
void printEduc8s()
{
}
void printByte(byte character [])
{
int i = 0;
for(i=0;i<8;i++)
{
lc.setRow(0,i,character);
}
}
Hata
exit status 1
array must be initialized with a brace-enclosed initializer
Kod ;
#include <LedControl.h>
int DIN = 4;
int CS = 5;
int CLK = 6;
LedControl lc=LedControl(DIN,CLK,CS,0);
void setup(){
lc.shutdown(0,false);
lc.setIntensity(0,12);
lc.clearDisplay(0);
}
void loop(){
byte a[8] = (0x00,0x3F,0x54,0x54,0x15,0x26,0x00,0x00);
byte b[8] = (0x00,0x38,0x08,0x38,0x08,0x38,0x00,0x00);
byte c[8] = (0x00,0x68,0x2C,0x2E,0x24,0x00,0x00,0x00);
byte d[8] = (0x00,0x6C,0x28,0x2E,0x22,0x2E,0x00,0x00);
byte e[8] = (0x00,0x37,0x31,0x17,0x54,0x76,0x00,0x00);
byte f[8] = (0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00);
printebyte a;
delay(4);
printebyte b;
delay(4);
printebyte c;
delay(4);
printebyte d;
delay(4);
printebyte e;
delay(4);
printebyte f;
delay(4);
printEduc8s();
lc.clearDisplay(0);
delay(1000);
}
void printEduc8s()
{
}
void printByte(byte character [])
{
int i = 0;
for(i=0;i<8;i++)
{
lc.setRow(0,i,character);
}
}
Hata
exit status 1
array must be initialized with a brace-enclosed initializer
Son düzenleyen: Moderatör: