const int row[8] = {
const int row[8] = {
13, 8, 17, 10, 5, 16, 4, 14
};
const int col[8] = {
9, 3, 2, 12, 15, 11, 7, 6
};
int pixels[8][8];
int x = 5;
int y = 5;
void setup() {
for (int thisPin = 0; thisPin < 8; thisPin++) {
for (int thisPin = 0; thisPin < 8; thisPin++) {
pinMode(col[thisPin], OUTPUT);
pinMode(row[thisPin], OUTPUT);
digitalWrite(col[thisPin], HIGH);
}
for (int x = 0; x < 8; x++) {
for (int y = 0; y < 8; y++) {
pixels[x][y] = HIGH;
}
}
}
void loop() {
pixels[0][0] = LOW;
pixels[1][1] = LOW;
pixels[2][2] = LOW;
pixels[3][3] = LOW;
pixels[4][4] = LOW;
pixels[5][5] = LOW;
pixels[6][6] = LOW;
pixels[7][7] = LOW;
refreshScreen();
}
void refreshScreen() {
void refreshScreen() {
for (int thisRow = 0; thisRow < 8; thisRow++) {
digitalWrite(row[thisRow], HIGH);
for (int thisCol = 0; thisCol < 8; thisCol++) {
int thisPixel = pixels[thisRow][thisCol];
digitalWrite(col[thisCol], thisPixel);
if (thisPixel == LOW) {
digitalWrite(col[thisCol], HIGH);
}
}
digitalWrite(row[thisRow], LOW);
}
}
Belgilarni ko'rsatish uchun LEDlarni yoqish va o'chirishni oldindan tayyorlash mumkin. A, B, C, D, E belgilar uchun xarita tuzamiz.
Belgilarni ko'rsatish uchun LEDlarni yoqish va o'chirishni oldindan tayyorlash mumkin. A, B, C, D, E belgilar uchun xarita tuzamiz.
const int row[8] = {
13, 8, 17, 10, 5, 16, 4, 14
};
const int col[8] = {
9, 3, 2, 12, 15, 11, 7, 6
};
int pixels[8][8];
int count = 1000;
char str[] = "EDCBA";
int strLen = sizeof(str);
int ptrChar = 0;
typedef bool charMapType[8][8];
const charMapType charDummy = {
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
};
const charMapType charA = {
{0, 0, 0, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 0, 0, 0},
{0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 0, 0, 0, 0, 1, 0},
{1, 1, 0, 0, 0, 0, 1, 1},
{1, 0, 0, 0, 0, 0, 0, 1}
};
ARDUINO platformasi bilan matritsani ulanishi.
ARDUINO platformasi bilan matritsani ulanishi.
Xulosa
Xulosa qilib aytganda Taymer maydonini uyingizga RGB LED matritsali panellari bilan olib kiring. Bu panellar odatda video devorlar yasash uchun ishlatiladi - bu erda Andijonda biz ularni avtobuslar yonida va bekatlarda - animatsiyalar yoki qisqa videokliplarni ko'rsatish uchun ko'ramiz. Biz ularni juda zo'r ko'rinadi deb o'yladik, shuning uchun biz fabrikadan bir nechta qutilarni oldik. Birida 512 ta yorqin RGB LED, old tomonida 16x32 panjara, ikkinchisida 32x32 panjara ichida 1024 ta LED mavjud. Orqa tomonda IDC ulagichlari bo'lgan PCB (bitta kirish uchun, bittasi chiqish uchun: nazariy jihatdan siz ularni bir-biriga bog'lab qo'yishingiz mumkin) va displeyni 1: 8 (16x32) yoki 1 bilan boshqarishga imkon beradigan 12 ta 16-bitli mandallar. : 16 (32x32) ko'rish tezligi ekanligini tushundim
http://fayllar.org
Dostları ilə paylaş: |