Pretty new to this but have gotten the cube up and running using the 3 NPN transisstor set up.'m using the arduino duemilanove 328. My question is when using POV how can I make a loop in a loop. Basically when your trying to light 9 led's at an angle but have to light one row at a time really fast to look like it's all three levels are on at once. I want this code to repeat a # of times then end and move on to other shapes or designs. any help at all would be great THanks Maybe this helps.
digitalWrite(7, HIGH); // set the LED on
digitalWrite(8, HIGH); // set the LED on
digitalWrite(9, HIGH); // set the LED on
digitalWrite(10, HIGH); // set the top row on
delay(10); // wait for a second
digitalWrite(7, LOW); // set the LED off
digitalWrite(8, LOW); // set the LED off
digitalWrite(9, LOW); // set the LED off
digitalWrite(10, LOW); // set the top row off
delay(10); // wait for a second
digitalWrite(6, HIGH); // set the LED on
digitalWrite(5, HIGH); // set the LED on
digitalWrite(4, HIGH); // set the LED on
digitalWrite(11, HIGH); // set the middle row on
delay(10); // wait for a second
digitalWrite(6, LOW); // set the LED off
digitalWrite(5, LOW); // set the LED off
digitalWrite(4, LOW); // set the LED off
digitalWrite(11, LOW); // set the middle row off
delay(10); // wait for a second
digitalWrite(3, HIGH); // set the LED on
digitalWrite(2, HIGH); // set the LED on
digitalWrite(1, HIGH); // set the LED on
digitalWrite(12, HIGH); // set the bottom row on
delay(10); // wait for a second
digitalWrite(3, LOW); // set the LED off
digitalWrite(2, LOW); // set the LED off
digitalWrite(1, LOW); // set the LED off
digitalWrite(12, LOW); // set the bottom row ground off
delay(10); // wait for a second