Hey,
ich habe einige Probleme mit Processing.
Ich weiß nicht wie ich mit einer for-Schleife machen kann, dass die roten Kreise, wenn sie ganz links sind, nochmal kommen, bis am Ende dann sozusagen alle rot sind.
Danke für die Hilfe.
Sketch:
int i = 63;
final Display d = new Display(64, 8);
void setup() {
size(1280, 160);
frameRate(5);
// light up first two leds
//d.setLed(0, true); // light up (0-0)
//d.setLed(0, 0, true); // light up (1-0)
//light up last row
//boolean [] row = {true, true, true, false, true};
//d.setRow(2, row);
// light up second last col
//boolean [] col = {true, true, false};
//d.setCol(3, col);
}
void draw() {
d.turnAllOff();
/*
boolean [] col = {true, true, true, true, true, true, true, true};
d.setCol(63, col);
*/
d.setLed(i, 0, true);
d.setLed(i, 1, true);
d.setLed(i, 2, true);
d.setLed(i, 3, true);
d.setLed(i, 4, true);
d.setLed(i, 5, true);
d.setLed(i, 6, true);
d.setLed(i, 7, true);
if (i > 0) {
--i;
}
d.show();
}