//Variables.
int pines[3] = {14, 12, 13};
int colores[][3] = {{1, 0, 0}, //Red
{0, 1, 0}, //Green
{0, 0, 1}, //Blue
{1, 1, 0}, //Yellow
{1, 0, 1}, //Violet
{0, 1, 1}, //Cyan
{1, 1, 1}, //White
{0, 0, 0} //Black
};
void setup() {
Serial.begin(115200);
pinMode(pines[0], OUTPUT);
pinMode(pines[1], OUTPUT);
pinMode(pines[2], OUTPUT);
}
void loop() {
for(int i=0; i<9;i++){
for(int j=0; j<3; j++){
digitalWrite(pines[j], colores[i][j]);
}
delay(1000);
}
}