4x4x4 RGB Cube rainbowduino. Everything works need help with the code


so have rainbowduino 4x4x4 rgb cube seedstudio. i've got cube doing stuff i'm @ 32% on chip there way make code more efficient , take less space? attach code on post not near computer right now

// 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);


  // starts second layer.


Arduino Forum > Using Arduino > Programming Questions > 4x4x4 RGB Cube rainbowduino. Everything works need help with the code


arduino

Comments

Popular posts from this blog

Help needed for choosing soldering station

Error Message when accessing Adobe

Fuelino for Arduino Nano - motorcycle Fuel Injection control and data logger