Änderungen

Rundbunt Mini Pattern

940 Byte hinzugefügt, 15:29, 4. Okt. 2015
Die Seite wurde neu angelegt: „=Matrix Rain Code= Globale Variablen: <pre>int pos[8] = {0,0,0,0,0,0,0,0}; int lng[8] = {1,1,1,1,1,1,1,1}; </pre> Pattern code: <pre> case 4: { CHSV c…“
=Matrix Rain Code=
Globale Variablen:
<pre>int pos[8] = {0,0,0,0,0,0,0,0};
int lng[8] = {1,1,1,1,1,1,1,1};
</pre>
Pattern code:
<pre>
case 4:
{
CHSV c_bg(113,100,0);
CHSV c_t(113,100,200);
CHSV c_p(113,100,230);

for(uint8_t x=0; x<8; x++) {
int h=pos[x];
for(uint8_t y=0; y<8; y++) {
if(h == y) {
hsvbuf1[x*8+y] = c_p;
} else
if(h < y) {
hsvbuf1[x*8+y] = c_t;
} else {
hsvbuf1[x*8+y] = c_bg;
}
}

if(lng[x] > -pos[x]) {
pos[x]--;
} else {
pos[x] = random(8, 30);
lng[x] = random(6,12);
}
}

showHSVg(hsvbuf1);

lng[0] = random(6,12);
int d = map(para[1], 0,1023, 100,500);
delay(d);
}
</pre>
688
Bearbeitungen