Gast
#2714710
Folgedes Problem: Ich möchte einen code, der unter Processing tadellos
läuft auf einem Arduino laufen lassen. Komischer Weise kommt bei der
Class, die ich definiere Fehler, die ich nicht verstehe. Warum bei
Arduino Fehler und bei Processing nicht?
Hier der Code:
Cell[][] cell = new Cell[20][20];
//...
class Cell {
int x, y, v, h, farbe, sample;
Cell(int x, int y, int v, int h, int farbe, int sample){
this.x = x;
this.y = y;
this.v = v;
this.h = h;
this.farbe = 0;
this.sample = 0;
}
void setFarbe(int neueFarbe){
this.farbe = neueFarbe;
}
void setSample(int sample){
this.sample = sample;
}
void toggle_play(){
if(this.farbe != 1)
this.farbe = 1;
else
this.farbe = 0;
}
}