// rainbowduino v3.0 library

#include <Rainbowduino.h>

void setup()

{

Rb.init(); //initialize Rainbowduino driver

}

unsigned int z,x,y;

void loop()

{

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,3,0,0x00FF00);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,2,0,0xFF0000);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,1,0,0x00FF00);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,0,0,0xFF0000);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,0,1,0x00FF00);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,1,1,0xFF0000);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,2,1,0x00FF00);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,3,1,0xFF0000);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,3,2,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,2,2,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,2,2,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,1,2,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,0,2,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,0,3,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,1,3,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,2,3,0x09099C);

}

}

delay(100);

for(x=0;x<4;x++)

{

for(y=0;y<4;y++)

{

Rb.setPixelZXY(0,3,3,0x09099C);

}

}

delay(100);

// this now starts the second layer.