I got a sketch from the internet (http://www.instructables.com/id/How-to-build-an-8x8x8-LED-cube-and-control-it-with/) for controlling the display of an 8x8x8 LED cube. The program won't compile and the error says "stray '#' in program". I looked it up on google but nothing appears to be relevant.
Here's a part of the code. (The error occurs at the baseColor = color(#222222);
line)
int rectX, rectY; // Position of square button
int ROWX, ROWY;
int rectSizeX = 80; // Width of rect
int rectSizeY = 20; // Height of rect
int circleSize = 20; // Diameter of circle
color rectColor, circleColorOff, circleColorOn, baseColor;
color rectHighlight, circleHighlight;
color circleCurrentColor;
color rectCurrentColor;
boolean rectOver = false;
// State of LEDs
boolean[][] circleOn;
// Position of LED buttons
int[][] circlePos;
// Mouse Over LED buttons?
boolean [][] circleOver;
int delayedby = 50;
void setup() {
//number of rows and columns
ROWX= 8;
ROWY= 8;
size((ROWX*40+10), (ROWY*44+30));
noStroke();
frameRate(10);
smooth();
rectX = ROWX*20-30;
rectY = ROWY*44+5;
// Colors
rectColor = color(#FF0000);
rectHighlight = color(#FFFF00);
circleColorOff = color(#444444);
circleColorOn = color(#ff0000);
circleHighlight = color(#CCFF00);
baseColor = color(#222222);
circleCurrentColor = circleColorOff;
rectCurrentColor = rectColor;
circleOn = new boolean[ROWX][ROWY];
for(int i=0; i<=(ROWY-1); i++) {
for(int j=0; j<=(ROWX-1); j++) {
circleOn[j][i] = false;
}
}
circlePos = new int[2][(ROWX*ROWY+1)];
// X Posistions
for(int i=0; i<(ROWX*ROWY-(ROWX-1)); i=i+ROWX) {
int Xpos = 25;
for(int ii=0; ii<ROWX; ii++) {
circlePos[0][i+ii] = Xpos;
Xpos += 40;
}
}
// Y Positions
int Ypos = 40;
for(int i=0; i<(ROWX*ROWY-(ROWX-1)); i+=ROWX) {
for(int ii=0; ii<ROWX; ii++) {
circlePos[1][i+ii] = Ypos;
}
Ypos += 40;
}
circleOver = new boolean[ROWX][ROWY];
for(int i=0; i<=(ROWY-1); i++) {
for(int j=0; j<=(ROWX-1); j++) {
circleOver[j][i] = false;
}
}
}
It turns out that the code was compiled in the earlier beta versions of the Arduino IDE, and now I don't know what I need to do for it to be compiled by my 1.6.5 version.