# LED Cube and Arduino Lib

4 Steps
There are other Instructables about building LED cubes, this one is different for several reasons:

1. It's built with a low number of off-the-shelf components and hooks up directly to the Arduino.
2. A clear, easy to reproduce circuit diagram is provided with plenty of photos.
3. A unique approach is used for the software which makes programming the cube easier and more expressive.

Parts needed:

-   1 Perfboard
-   3 NPN Transistors (2N2222, 2N3904, BC547, etc.)
- 12 Resistors (~220 ohms and ~10k ohms)
- 13 Headers (male or female)
- 27 LEDs
- Wire

Remove these ads by Signing Up

## Step 1: Prepare the LEDs

This step largely follows the LED Cube 4x4x4 but we'll be building a 3x3x3 cube instead. A cube of this size is about as big as it gets without introducing additional circuitry and complexity. We'll need a total of 27 LEDs that will be grouped into three sets of nine.

Each set of nine LEDs will share a common connection amongst their cathodes (negative leads). I'll refer to each of these sets as a "level". Each of the nine LEDs on a level is connected to the corresponding LED on the other two levels through their anodes (positive leads). These will be referred to as "columns". If that didn't make sense it will become self explanatory as we build the cube.

To start we'll use a drill to create a jig out of a small piece of scrap wood. The jig will hold the LEDs in place while we solder them. I decided to space the holes around 5/8 of an inch apart (~15 mm) but the exact distance isn't critical. The hole should have a tight fit around the LED since we don't want them to move around while soldering.

Once the jig is done we're going to bend the cathode of each LED in a 90 degree angle. The cathode is identifiable in three ways: 1) It's the shorter leg, 2) It's on the flat side of a round LED, 3) it's connected to the larger piece inside the LED. Make sure you bend the cathode in the same direction for all of the LEDs.

Now we're ready to begin soldering.
ironheartbj18 says: May 19, 2013. 2:59 PM
download gzip frist then unzip file attached to any verison arduino/libraries click extract all file after that then you will have to same thing file as EEPROM, ENTERNET, etc. for example go to eeprom there have four file which are eeprom.h, eeprom cpp, keyboard.txt, and example that are in your in your sketch already it will showing orange letter. the ledcube does not name a type because it does not exist in your libraries. so you will have to make new folder move four files into ledcube folder.
espongy says: May 18, 2013. 9:20 AM
Hi. I just want to clarify something. I've been searching everything about building an LED Cube here in Instructables. Aren't the collectors connected to the GND while the each emitter is connected to each row/layer?
profT says: Apr 30, 2013. 1:43 AM
hello,
is it possible to transform your 3x3x3 led cube to 7x7x7 one. I try this and the result is not like I would! My output are not in order, how can I write them : first line (left to right) second line (left to right or right to left) etc...
and when a led sould be on it's be of and inversely, is it normal?

thanks
Gregted says: Apr 10, 2013. 4:45 AM
Great instructable. Worked first time. Had to find the Pin codes. They were in the arduino script but great anyway. Levels 1 pin11, 2 pin 12, 3 pin 13, and leds are pins 2 through to 10.
gzip (author) in reply to GregtedApr 20, 2013. 10:10 AM
Thanks. I've added a paragraph about pins to the end of step 3.
lynxhockey says: Apr 19, 2013. 3:33 PM
Hey, this is my first Arduino project, but I'm having some issues getting the code pushed from the sketch to the Arduino. (I'm running 1.0.4 if that matters.) However, I keep getting an error when I try to upload it that says "avrdude: stk500_getsync(): not in sync: resp=0x00" . Also, in the event that it matters, I'm using the Arduino Diecimila.
gzip (author) in reply to lynxhockeyApr 20, 2013. 9:59 AM
You might have the wrong programmer selected or maybe it's not getting enough power.
herroc says: Apr 6, 2013. 6:44 PM
awesome project, took about 2hrs start to finish. No issues at all, though i would bend the legs the opposite way (as suggested). thanks
chromedome45 says: Apr 3, 2013. 5:14 PM
Never mind I fugured it out and it works great. However form ledcube I had to modify the ledcube.cpp file and remove the refernce to newfix.h. Until then I had problems compiling.
gzip (author) in reply to chromedome45Apr 3, 2013. 7:01 PM
What were the compile errors and what version of the Arduino software?
chromedome45 says: Apr 3, 2013. 1:51 PM
One more question where do you apply power? to what pins?
chromedome45 says: Apr 3, 2013. 1:47 PM
Question about the Transistors. Is the Emitter being grounded. Looks that way.
rdela cruz2 says: Mar 25, 2013. 3:23 PM
thank you so much, that worked for me!!! hehe :)
shawnchristophrevaz says: Mar 7, 2013. 5:37 AM
hi,
can you please help me in connecting the wires from the led to the the ports on an adruino?

i have very little knowledge on which port to connect thee pins from the led to the adruino
antisubae says: Feb 10, 2013. 3:48 PM
I fiddled with the design a little and crammed it on to a Seeed ProtoShield today. Not my best work, aesthetically, but it worked like a champ on the first try! I'm no stranger to a soldering iron, but I'm *really* new to the Arduino. It's projects like this that are really motivating me to learn the software side of things. Thanks for the awesome Instructable, gzip!
maikmuc says: Dec 30, 2012. 7:53 AM
Hey nice cube :-)
First I wanted to write my own library, but am not so fit yet... So I try to understand Yours and am playing around with Your code.
In the function LedCube::lightDrop I found an error since the column on Pin 10 never lights up. The parameter where You call lightPulse has to be (r-1, col, wait)
and not lightPulse(r-1, col-1, wait);
and I also wrote a function called lightRise so You can do a random column rise:

void LedCube::lightRise(byte col, unsigned int wait)
{
for(byte r=0; r<=levels; r++)
{
lightPulse(r-1, col, wait);
}
}
gzip (author) in reply to maikmucDec 30, 2012. 8:11 PM
Hi,

Please try the latest on Github:
https://github.com/gzip/arduino-ledcube

And feel free to submit a pull request for the new method (or the bug if it's still present).
Eduort says: Nov 9, 2012. 9:40 PM
Hi, it looks very good, but i have a question, is posible to add more routines and start each whit a button?
fueler335 says: Oct 16, 2012. 7:42 PM
AWESOME work on the library! Thanks so much for the transition from a 4 by 4 by 4 cube to a 3 by 3 by 3.I did this for a school project and got an A from it.Great website,as well... :)
bubzyg says: Sep 14, 2012. 3:50 AM
I have written an alphabet for this project, if anyone is interested in the code please let me know :)
bubzyg in reply to bubzygSep 26, 2012. 6:14 AM

code is inefficient as the arrays are defined each time the loop runs, this is just to move them through the "planes" with a bit of work, this can be rectified.
some coding knowledge may be required.
oslik_ia in reply to bubzygSep 25, 2012. 9:56 AM
Hi, can i get code for an alphabet ?
ohtextex in reply to bubzygSep 17, 2012. 2:22 PM
i was going to do that after i finished a few additions/tweaks to this library. great learning experience this project turned out to be.
jtmanders says: Jul 17, 2012. 6:43 PM
ok so i have built my cube very similar to yours and the code works on it. however my cube is 4x4....how would i go about changing the code so it would run the entire cube? is this even possible? thanks
gzip (author) in reply to jtmandersJul 27, 2012. 12:20 AM
This is a work in progress so let me know if you have any luck with it.
Arduino LED Cube code
ride on toy dude says: Jul 20, 2012. 1:27 PM
What is the color code on the 220 ohm resistors? I'm short on cash and am trying to harvest a couple from any electronics I can find.
ride on toy dude says: Jul 20, 2012. 1:25 PM
Thanks for the code!!
hampp890 says: Jul 18, 2012. 9:53 PM
Can anyone help me i have tried everything to upload the code to my Arduino Uno, and nothing seems to be working. I have unzipped the files into libraries and examples but I still get the same error code. (ledcude does not name a type) If anyone could help me that would be great.
mnralhajj says: Jul 14, 2012. 9:50 PM

hi,, thank u for your efforts,, i did every thing right but when i download the library an error occurred :

1-
at LedCube cube(SIZE, levelPins, colPins); i get this error :

'LedCube' doesn't name a type
cooltronics3200 in reply to mnralhajjJul 17, 2012. 4:44 PM
the same thing is happening to me!
timboo says: Jun 7, 2012. 2:29 PM
This is the first time iv ever done anything like this, i understand how to put the leds together. just when it comes to the circuit board it gets abit confusing. iv started buying the parts for this from the list, well i think the stuff iv bought is right, only thing is i cant find any headers, cant see any on ebay and dont know what they even look like!!! and can someone give me a link for the jump wires on ebay? any help would be great please. is there a step by step way of explaining how to put together the circuit?

Thank you in advance :)
gzip (author) in reply to timbooJun 8, 2012. 9:41 PM
Don't worry about the "jumper" part, any wire will do. Here's a link to headers on ebay. There's no more step by step than than the steps on step 3.
timboo in reply to gzipJun 9, 2012. 6:02 AM
Thank you for your help. I wanted to get the parts from the u.k as thats where i live. Would these headers be fine http://www.ebay.co.uk/itm/10x-Single-Row-Male-Female-40-Pin-Header-Strip-2-54mm-/180688882757?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item2a11e58c45

and then get these jump wires
http://unmannedtechshop.co.uk/Cables-Connectors/Jumpers?product_id=115

Cant wait to get going on this!!

Cheers
gzip (author) in reply to timbooJun 9, 2012. 10:55 AM
The headers are fine since you get both male and female so you can choose which one to use. The jumpers will work with a little help (by sticking a male pin in one end) but are not ideal since they're female to female. The instructable uses female headers and male to male jumpers made from a hard drive connector cable and male headers (which is labor intensive but nice looking). Simple pieces of wire will work just as well. Something like this male to female ribbon cable will also work nicely if you use male headers on the cube board.
stringstretcher says: Mar 8, 2012. 2:08 PM
I'm experimenting with the routines and find that one column doesn't light up properly in the routine //columns in and out. I have been looking at the cpp file but can't find out what the problem is. Has anyone else seen this? Any ideas? The cube works perfectly otherwise and I love it! Also, the routine you supplied here is not the one featured in your vid is it? Mine doesn't follow these steps!
gzip (author) in reply to stringstretcherMar 8, 2012. 7:37 PM
It's the same routine, the video just starts somewhere in the middle.
stringstretcher in reply to gzipMar 9, 2012. 2:05 AM
I'm sorry, but I beg to differ! My cube doesn't look like this... maybe it's the nut holding the wheel? (me)I'm wondering it there is a bracket missing, which would exclude some of the routines in my sketch. I see some of the sequences, and they should. I will post a vid link so you can have a look. We might learn something! I don't know enough yet to figure this out, hence the questions. Can you point me anywhere to learn more? Thanks for taking time to answer, this is a great little cube and I have had o much fun showing it to my friends. If anyone is interested I will post my revised code, gives a little variation to the cube's appearance.
gzip (author) in reply to stringstretcherJun 3, 2012. 10:17 AM
I finally got around to pulling out my cube and testing this out. As a matter of fact I did manage to botch the software somewhere along the line. The problems are now fixed and as a consolation I've added a few new effects while I was at it. Please download the software again on step 4. Thanks for the report.
ryanprocter says: May 12, 2012. 4:32 PM
also the only jumper wires i can find are breadboard jumpers. are these ok or are these completely wrong?
gzip (author) in reply to ryanprocterMay 14, 2012. 9:13 AM
Breadboard jumpers are fine but a spool of wire (or even salvaged wire) is just as good.
ryanprocter says: May 12, 2012. 4:20 PM
Hi im completely new to all of this and would like to know what board i need to buy. would this work with an arduino USB UNO?
gzip (author) in reply to ryanprocterMay 14, 2012. 9:12 AM
Yes, any Arduino will work.
aus151 says: May 1, 2012. 12:49 AM
I'm plugged into Pwm pins 2-10 for columns and 11-13 for levels, it looks great but not like the video. any pointers for a noob? It took 3 prototypes before i came up with a cube that was perfect. All my leds are hitting my output pins with perfect resistance.
4eyes12 says: Apr 25, 2012. 10:46 PM
Made the cube and uploaded the script, but I'm having a technical issue. My bottom center led in the cube will not function in the arduino routine, but is perfectly functional when tested with a battery... dose not seem to be a connection problem as the two leds above it still function. Any advice or ideas??
4eyes12 says: Apr 23, 2012. 8:36 PM
Forgive me if I missed something but it would be nice if you posted a picture or a list of what headers from the cube pcb are connected to which pins on the Arduino. Other than that good tutorial, thank you!
Duncan Stewart says: Apr 7, 2012. 1:15 PM
I built my cube a couple of months ago and am only now getting back to trying it out. Should I be able to upload the library and run it, or do I need to reference the library in a separate sketch?

When I try to upload the library directly, I get the following message:
avrdude: stk500_getsync(): not in sync: resp=0x00

Thanks!
gzip (author) in reply to Duncan StewartApr 7, 2012. 10:18 PM
That's a hardware problem, likely nothing to do with the cube. Make sure you have the right board and port selected in the Arduino software. If that checks out then you might try a different USB port since sometimes the board can't get enough power.
Duncan Stewart in reply to gzipApr 15, 2012. 10:35 AM
Cool! It was the com port, apparently (though I also added external power AND switched USB ports, so there's a distinct lack of scientific method here.)

Thanks!

sromero3 says: Apr 6, 2012. 12:51 PM
Hello, I need help please.
In the video (which is the LED cube example) you can put only one LED on the third level, without the need to turn off the rest of the column, the second 4 of the video you can see. Is it possible with Arduino?
How I can do?
My question is because when I try to do, for example, just turn on the LED Level 2 column 4 and the LED Level 1 column 5, the LED on the level 1 column of 4 lights also because the level and column are on
gzip (author) in reply to sromero3Apr 7, 2012. 10:23 PM
The levels are multiplexed. That means only one is lit at any given time but the cycle is so fast that it looks like multiple levels are lit at once.
sromero3 in reply to gzipApr 8, 2012. 9:08 AM
Thanks a lot, I will try to do with MUX!! Do you have pictures or more information about that?
sromero3 in reply to sromero3Apr 9, 2012. 6:31 PM
sorry for a new cuestion! maybe the only problem that i have is wen i try to turn of only one led when i have the rest in on!! Can you help me with your code?
blinkyblinky says: Mar 31, 2012. 7:30 AM
I lost track. which Arduino pin goes to which transistor? I did some probability and found I could have 6 different possible ways of doing it. Can you please specify?
gzip (author) in reply to blinkyblinkyMar 31, 2012. 11:12 AM
The example is configured (from bottom to top) as:
```byte levelPins[SIZE] = {11,12,13};
byte colPins[COLS] = {2,3,4,5,6,7,8,9,10};
```
Thanks. So the top level is pin 11 is the top level, pin 12 is the middle level and pin 13 is the bottom level?
gzip (author) in reply to blinkyblinkyMar 31, 2012. 3:51 PM
Vice versa on 11 and 13.
mastercheefryu says: Feb 22, 2012. 9:57 PM
Im getting some problems, the arduino 1.0 version doesnt have the sketch folder so where should i place it? directly to libraries? Im doing that but its not working. These are the probs im getting:

ledcube.cpp:1:21: error: LedCube.h: No such file or directory
ledcube.pde:-1: error: 'LedCube' does not name a type
ledcube.cpp: In function 'void loop()':
ledcube.pde:-1: error: 'cube' was not declared in this scope

Plz help me
Cloudhail in reply to mastercheefryuMar 7, 2012. 11:04 PM
I unzipped it to the library folder then i unzipped it to the examples folder. in the actual arduino script editor you have to go to the sketch tab (up top) and IMPORT LIBRARY!!! select ledcube. once that is imported I went to the file tab(uptop) and loaded ledcube. with all of that done I hit upload and It works now. Does this make any sense?
gzip (author) in reply to CloudhailMar 8, 2012. 7:33 PM
You don't need to unzip to the examples folder separately since the examples under libraries will get picked up automatically. Sketch > Import Library > LedCube is only needed for a brand new sketch. That will add #include <LedCube.h> to the top of the sketch.
Cloudhail in reply to gzipMar 8, 2012. 8:29 PM
This is correct, sorry for the extra step. However the import library is a must. This will give you the error if you don't load the library. It took me a little bit to figure that out.
gzip (author) in reply to CloudhailMar 8, 2012. 9:49 PM
So even with the included example you need to import library before it compiles correctly?
Cloudhail in reply to gzipMar 8, 2012. 10:07 PM
Yes
gzip (author) in reply to CloudhailMar 8, 2012. 11:26 PM
That's strange. I wonder what's going on there. Is the #include missing to begin with and then the import adds it? I tried downloading the zip and extracting it fresh but couldn't reproduce. I unzipped to libraries in my sketchbook and then to the main libraries folder. Both worked. What version of the Arduino software are you using and on what OS?
Cloudhail in reply to gzipMar 9, 2012. 12:46 AM
Sadly I'm still on vista (I'm a Mac) I'm using the UNO, and yes it does put the #include tag into the top of the script. It's working for me just fine. But this is the way I got it to work. I just figure if anyone was having the same problem as me I could share. Is this not supposed to happen? It may help to know that I start the editor program up without anything loaded at all. (just double click the arduino symbol icon) then I do what I mentioned before.
gzip (author) in reply to CloudhailMar 9, 2012. 6:29 PM
And you're using the Arduino 1.0 software or older? I'm on Linux (Ubuntu) with 1.0 so I'll try Windows as well (but all I have is XP). You shouldn't have to import the lib for the included example but maybe some combination of software is causing problems.
stewart_14 in reply to mastercheefryuMar 4, 2012. 9:20 PM
Did you ever get this fixed? im having the same problem!
gzip (author) in reply to mastercheefryuFeb 22, 2012. 11:19 PM
The sketchbook folder should be created automatically under your home directory when you open the arduino software. The exact location will vary according to OS. You can create the libraries folder there if it's not already present.

Another option is to add the library to the main libraries folder (which is in the same folder as the arduino executable). It's just a less flexible location since you'll have to move any libraries that you've added there the next time you upgrade the arduino software.

Either way you should find the example under File > Examples > LedCube > ledcube if you've set everything up correctly.
stewart_14 in reply to gzipMar 4, 2012. 9:31 PM
Did you ever get this fixed? im having the same problem!
alsetalokin says: Feb 28, 2012. 7:58 PM
I fixed even more of the software, and added a few new patterns. There does seem to be a bug, maybe in the hardware, concerning the writing of the buffer using a 128-slot byte array, or rather vector ... which winds up having some crazy values inserted in it somewhere between filling the array with all zeros and writing it to the buffer, which winds up lighting a few lights incorrectly when the buffer is written to the active pins.
The performance of the pattern select button interrupt is still a bit flaky and annoying but overall there's improvement.

http://205.196.120.174/bz76g4wwdkpg/rqi7xkzmjc0yzlg/AlsLEDCube4x4x4Bv2.zip

The other link below has been removed, and the Version 2 really is better, so if anybody actually downloaded the first version, please dump it and use V2 instead.
Thanks for a great time waster !!
--Al
gzip (author) in reply to alsetalokinMar 8, 2012. 7:41 PM
Thanks for sharing this. Maybe I can get my memory management in order enough to declare the arrays dynamically so that the code can support any number of LEDs. Your diff is helpful for identifying the places which need to be updated.
fobia says: Mar 7, 2012. 7:48 PM
Finally I finished! thanks you so much for all the info in this site.
adumas says: Apr 28, 2010. 11:43 AM
Hi... I just built this and have a couple of questions...  I tried using the transistors but the LED output intensity was minimal. I bypassed the transistors and when directly to the output pins (which I declared in the pde). That seemed to do the trick - now everything is brightly lit...  So my question, is why the transistors? I doesn't seem to need it...
Secondly, how can I expand this to be 4x4, 8x8, etc.  Is your library scalable - what modifications would need to be made?  I hope you answer, I loved this project...
gzip (author) in reply to adumasApr 30, 2010. 11:07 PM
The transistors allow all levels to appear to be powered at the same time while using a low number of pins. Try using a lower value for the base resistors and make sure you're using a high enough voltage to account for the voltage drop across the transistors.

I tried to keep a scalable library in mind while coding but its still mainly geared towards a 3x3x3. If you're comfortable making modifications I can take a closer look to give you an idea of what it might take. You'll still need either more pins or some type of shift register or driver to power more LEDs.
fobia in reply to gzipMar 7, 2012. 7:38 PM
Hi I just finished my LED cube and I had the same problem with the LED output, it was very dim, after reading your temporary solution in this post, I by pasted the 220 transistors (there was no way I was gonna de-sodldering) and all LEDs work just fine, now my question is what kind of resistors did you used or think we should used for the next project?
adumas in reply to gzipMay 1, 2010. 6:53 AM

My power source is the arduino at 5v - I'm using the Modern Device board. Should I be contemplating an external power supply?

I am changing gears and will use shift registers... I want to build an 8x8x8 cube...  I now have 3x3x3 and 4x4x4 cubes working fine using your library... Which is great.

I think it would be great to have your library handle the 8x8x8.

I just finished making an acrylic template that will allow me to build a more precise cube. The wood base lent itself to errors... I used a laser cutter for the acrylic...
jwgillon in reply to adumasJan 8, 2012. 2:57 AM
I've been trying to modify the code to work on a 4x4x4 cube without any luck. Can you send me your code? If so, can you specify if you used transistors ...
4and20chars in reply to adumasFeb 24, 2011. 4:46 PM
I am attempting to build a 4x4x4 and I wanted to know what were the resistors on the base of your transistors.

Also, I was not sure if I needed to change the library or not. There were some items in the example code I though to change but I am not sure. I have java experience but I am new to arduino, so understanding code is easy but understanding the arduino is harder.

Would you be willing to send me the source for your 4x4x4 so I have something to work off of? Thanks.
gzip (author) in reply to adumasMay 1, 2010. 9:25 PM
You're going to need an external power supply if you want to drive an 8x. That's a lot of LEDs! For the 3x you can probably just reduce the value of the resistors connected to the base. It's likely that the transistors aren't being saturated.

Cool that you're able to use the lib with a 4x. How many mods did you have to make? Send me the code when you have a chance.
jwgillon in reply to gzipJan 8, 2012. 3:02 AM
Did adumas ever send you the code? If so, can you forward that when you get a chance? I made a crude version of your 3x3x3 cube --- very cool --- and just finished a much nicer looking 4x4x4 ...
gzip (author) in reply to jwgillonJan 9, 2012. 10:21 PM
No, never did.
alsetalokin says: Feb 27, 2012. 6:53 AM
I put a video of my 4x4x4 cube on YT, with a link back here. Thanks again, gzip and bogyman57 for the instructable and the code package!!

I thought this instructable was the best of many concerning the building and operation of an Arduino-powered LED cube, even though it was just for 3x3x3. The 4x4x4 version is still pretty cheap and simple to build, but the other builders didn't have the great program code that gzip and bogyman57 have here. The existing code is "almost" fully ready for 4x4x4, and it's obvious that gzip and bogy wrote it with as much generality in mind as possible. I tried to make my modifications and additions with the same idea, but there are a couple places where I got lazy and hard-coded the 4 and 16 parameters or a brute-force routine. This can be easily fixed, I think, to generalize the sketch and the other files to arbitrary X x Y x Z arrays.
alsetalokin says: Feb 26, 2012. 5:53 PM
OK... after a couple days work I fixed the software library to cover the 4x4x4 cube, with some fixes to the patterns (not all) and a button to select pattern and a couple of basic sound effects.
My cube works great with the OSEPP arduino MEGA clone. Others might have to adjust the pinout arrays in the .pde file to correspond to your cube wiring, but if you follow the instructions in this instructable and just extend in the logical manner your pinout will be the same as mine, probably.

Thanks for this great instructable and the originals of the library files!! I can really appreciate how much work went into writing those files.

Others may also need to adjust the timing variables to get the patterns to display pleasantly on your board.

The zip file of the .pde, the .cpp, and the .h files is here:

[url]http://205.196.121.50/3jbuw3i36mvg/laj2cixxb9z99hh/AlsLEDCube4x4x4Button.zip[/url]

Fun Stuff !!
--Alsetalokin

BrigadaBogeyStalker says: Feb 24, 2012. 1:21 PM
How do i connect the cube to the PC ? Please tell me...
BoskoSLO in reply to BrigadaBogeyStalkerFeb 25, 2012. 12:42 PM
the most important part u need is a "ARDUINO controller"
u can get them on ebay or in many other shops.

for example this arduino:

u get a cable with it. with the USB cable u can connect the arduino to the PC and install the program into it or program it by your self.

go to arduino.cc and download the software. that here on the last step u can download and example and send it to the arduino.

hope it helps. thats all i know :)
alsetalokin says: Feb 25, 2012. 10:33 AM
The "OneLevelAtATime1" pattern function only lit the bottom 2 levels of my 3x3x3 corner (of my 4x4x4 cube) but all other patterns worked. The "lightLevels" function in LEDCube.cpp tests for r=TRUE but the call from the .pde file passes r=0 for the initial level.... which of course is r=FALSE so that level doesn't light up.
My solution was to replace the
" if (r && r < levels) "
with the code
" if ((r+1) && r < levels) "
in the "lightLevels" function in the LEDCube.cpp file, save the file, exit the Arduino IDE and restart, recompile your .pde file. Now all three levels work in the "OneLevelAtATime1" function call.

Please -- can you help to extend your code to a 4x4x4 cube !!??
alsetalokin says: Feb 24, 2012. 10:38 PM
Hi... I built the cube but I made it 4x4x4 for an Arduino Mega (lots more pins) and it works fine with 4x4x4 software from another instructable, and the 3x3x3 corner works with your .pde and .h files. I can't figure out how to extend your program to the 4x4x4 cube, though. It looks like it would be an easy change, but I can't get it to work as a 4x4x4.
I'm not sure I have the column pins correct for the other software; that instructable wasn't too clear on columns, rows, and planes, but I think I'm correct because it makes what seems to be the proper patterns.

I'd like to be able to use your software in a 4x4x4 version.... is it possible to modify the program easily?

Thanks--- great fun project.
Blackice504 says: Jul 26, 2011. 8:06 AM
Hi mate nice job, but if all the transitors are connecting the levels or rows to ground why not use just 3 transistors or even having said that do the calculations for the total current and have 1 resistor to ground on the trasistor because no matter what all current must flow to ground via the transistor?
yes the value would be higher then what you are using i.e 1 watt but i think that may work but i could be wrong anyway i have nearly finished my own so i will try this with a 50 Ohm POT, anyway thanks for your help.
gzip (author) in reply to Blackice504Feb 22, 2012. 11:28 PM
Late answer but the reason is that the current will vary depending on how many LEDs are lit on any given level. The only reliable method of limiting current is to limit it for each individual LED since any number of them can be lit at any given time.
BoskoSLO says: Feb 19, 2012. 11:13 AM
hello.
i understand the part how to make the cube without arduino "part".

is this arduino ok?

if yes. How do i know where to connect individual wires from the cube to the arduino itself? TBH i really dont know anything about microcontrollers/microchips nor know anything how to program them. but i know basic electronics such as:
welding/soldering , know how to use a multimeter, knowing many formulas about electricity, etc.

one more question: do i get the programing software with the arduino? and how to transwer pre-made code to the arduino without programing "part"?

I'm very interested to make my self a 3x3x3 cube. because it looks so good.

have a nice day.
gzip (author) in reply to BoskoSLOFeb 20, 2012. 7:44 PM
Yes, that board will work. You can download the Arduino software from arduino.cc and follow the instructions in the last step here to install the cube lib and program it.
BoskoSLO in reply to gzipFeb 21, 2012. 10:26 AM
Hi again!

I unzip-ed the "LedCube.zip" into the sketchbook/libraries folder and into the examples folder, than i ran arduino.exe and opened the example and clicked compile. it gave me no error, so i think i did it right.

So now after the example is compiled, its ready to be uploaded to arduino,
and the led cube should start working?

and i still dont know how to connect the wires from the headers on the cube to the arduino board.
should i try to connect them as u did in the first picture of this instrustable?
sorry if i sound a little stupid because i dont know much about arduino.
gzip (author) in reply to BoskoSLOFeb 21, 2012. 11:04 PM
Yeah, you can use the photo as a reference. You can also open the example sketch to take a look at the default pin assignments.
``````byte levelPins[SIZE] = {11,12,13};
byte colPins[COLS] = {2,3,4,5,6,7,8,9,10};``````
BoskoSLO in reply to gzipFeb 22, 2012. 12:51 AM
aha now i understand what u mean. If i'm right the last wire is the power "+5V" that goes into the "female set of headers, pin number "3"".
I read that from the schematic for the arduino.

I'm gonna try to mess with the code and try to program a bit :)
most of the codes makes sense and are easy to understand,

thx for help. will build the cube as soon asi get the materials.

have a nice day!

chripalo says: Feb 17, 2012. 6:17 PM
hi...i have a question.... I'm from greek and i looking for Ardruino but i don't know the deffent between Arduino Uno and Ardruino Uno rev3.I found a shop in my country but i can't understand what from this product i must choose to work the cube...

http://www.citistore.gr/arduino-uno.html
http://www.citistore.gr/arduino-uno-rev3.html

gzip (author) in reply to chripaloFeb 18, 2012. 9:56 AM
Hello, The difference between the two is listed on arduino.cc. But any 'duino will work for the cube (I'm using a Freeduino in the 'ible). Fwiw, my next board would probably be a Seeeduino. Btw, your English is great! I can't speak any Greek. :)
gzip (author) says: Dec 7, 2011. 10:33 PM
The software is now updated for Arduino 1.0 and includes an example in the download.
birthur in reply to gzipFeb 6, 2012. 5:00 PM
hello, do not know why but this code gives me error in the arduino 1.0. Could you please help me and if you leave me a comment here would be great since I have a Blast Card with which to pay to download the file
gzip (author) in reply to birthurFeb 8, 2012. 12:01 AM
What's the error?
birthur in reply to gzipFeb 11, 2012. 8:54 AM
For example:´ LedCube does not name a type´
I am also new to this and do not speak English XD
birthur in reply to gzipFeb 10, 2012. 1:51 PM
-
birthur in reply to gzipFeb 10, 2012. 1:44 PM
I suggest you open the code and you check
gzip (author) in reply to birthurFeb 11, 2012. 9:54 AM
I'm not sure what you're doing with the "aaqqq" file is but it looks like a version of LedCube.h with truncated lines. The truncated lines are creating syntax errors.

As for "LedCube does not name a type" and "LedCube.h: No such file or directory", It sounds like you still need to unzip the LedCube folder to sketchbook/libraries. Once you have that set up correctly you'll get an entry under File > Examples > LedCube > ledcube which you can open and compile without problems.
birthur in reply to gzipFeb 13, 2012. 5:49 PM
oka....! thanks. I proves to see what happens
jlateur in reply to gzipDec 8, 2011. 11:01 AM
I want to make a animation as firework for the time of the year. But i don't understand the whole script. can you help me on way? like how do i set 1 led to high etc
Regulators.Mountup says: Jan 10, 2012. 9:38 AM
I am very new to this whole deal, and I wanted to try this out as a first project (other than blinking LED). The construction of the cube and circuit soldering took significantly longer than I anticipated, but as I said, this is really the first time I've done anything like this, so I was learning as I went. Here are some nuggets of wisdom I picked up:

1) As suggested by the instructor, if I were to do another one of these, I would wire up the LEDs so that the cathodes are on the outside (i.e., the gnd connections that all LEDs on a single level share) and the anodes were on the inside (i.e., the + connection shared by all LEDs on a single column). I did it the opposite way, and i had to bend a lot of the leads on the columns over the LEDs below. Also, I had two rows of blue and one row of red because that's what I had on hand.

2) Definitely be careful about all of the overlapping wires connecting the resistors to the cube's columns. I didn't have electrical tape and used duct tape, which I wouldn't recommend. I'm having some problems with one particular column (#3) not lighting up, which I suspect has something to do with having several different wires overlapping it.

3) I did not have the fancy pin connectors shown in the picture, so what I did was take a bunch of rubber coated leads I had from a starter pack and pulled off one of the metal tips from the rubber gaskets on the end. I then plugged those (now female) sides of the leads onto the pins sticking up from the perf board.

4) This took me several hours to build and solder, but I was extremely happy with the sucker powering up and dancing on the first try. The sample library compiled and uploaded without error on an Arduino Uno r3 and Arduino 1.0.
rebelariat89 in reply to Regulators.MountupFeb 8, 2012. 2:16 PM
i need to find out how to get the control box for the cube
birthur says: Feb 6, 2012. 4:57 PM
hello, do not know why but this code gives me error in the arduino 1.0. Could you please help me?
stringstretcher says: Jan 16, 2012. 2:20 PM
Mine works! What a cool toy. I'll be chillin' out with this for a while. Thanks for the instructable!
Regulators.Mountup says: Jan 10, 2012. 9:49 AM

Booya
jwgillon says: Dec 7, 2011. 11:44 AM
Very nice tutorial. Thanks!
jlateur in reply to jwgillonDec 7, 2011. 3:14 PM
I get compile errors...
i use the latest arduino software. its the same as andray.
What version do you use Jwgillon?
jlateur in reply to jlateurDec 7, 2011. 3:23 PM
problem found. thx. change WProgram.h to Arduino.h. its work perfectly
andraiy says: Feb 14, 2010. 8:22 PM
is there meant to be a "WProgram.h" file? because its #included but its not in your library as far as i can see. i also get the error: 'byte' does not name a type when i compile your code. any help is appreciated
gzip (author) in reply to andraiyFeb 14, 2010. 10:07 PM
WProgram.h is part of the Arduino core. It sounds like there's some general problem with your environment...
jwgillon in reply to gzipDec 6, 2011. 10:02 PM
For latest arduino software you need to replace "wprogram.h " with "Arduino.h" in the LedCube.cpp and LedCube.h files.

daniedb says: Nov 27, 2011. 10:42 AM
Hi
I've build this cube Will this code work on ARduino Uno. Getting a Bunch of Compile errors
Thanks for sharing
Danie
theAVRdude says: Nov 6, 2011. 3:43 PM
movie
theAVRdude says: Nov 6, 2011. 3:32 PM
Will this work?
sorry i dont want to wast your time, just trying to figure things out.
theAVRdude says: Nov 6, 2011. 12:57 PM
tHats so cool, made mine this weekend and it works! Very Happy about your ible,nice and simple.
I used female headers so I could use the jumper wire I had.
Heres a pic

I would kill to get some more code, effects for my cube but I just can't get my head to figure out how to do this...

anyway, thanks

Eric
theAVRdude in reply to theAVRdudeNov 6, 2011. 3:25 PM
Can someone explain to me how to upload pics and vids??

Thanks
http://img.instructables.com/files/deriv/F01/I0OW/GUOAEGJA/F01I0OWGUOAEGJA.SQUARE.jpg

that was a try...
mbaviskar says: Oct 22, 2011. 5:55 AM
Hi when i compile the code' Led has not declared 'come what should i do in this case please help me
fdratwa says: Sep 30, 2011. 3:14 PM
It's possible to build it with out the Arduino and the 13 headers?
Mudbud says: Sep 16, 2011. 3:45 PM
I flipped the anode in and dude... HUGE MESS.... Like, it wasn't a cube shape lol. Don't try it..
Mudbud says: Sep 15, 2011. 1:55 PM
Will this work with the BS2?... Well I will find out anyway :P
Mudbud in reply to MudbudSep 16, 2011. 3:40 PM
Works AWESOME!! woot thanks man! Will post pics later..
axeman911 says: Sep 6, 2011. 8:17 PM
Thanx so much in all the other other instructibles they make it really confusing on the build of the cube. Ur's is s simple! :)
raymondlowe says: Aug 27, 2011. 11:58 PM
Short vid to show that it came out nice.

Thanks again for the great instructions.

raymondlowe says: Jul 28, 2011. 6:42 AM
Thanks, I just finished building this with my son and it came out great.
ccardenas2 says: Jul 26, 2011. 5:10 PM
I have already created my LED cube but do not know how or what program you are admitted to the instructions to arduino
Robo-labs says: Jun 17, 2011. 8:01 PM
can this be done with an Arduino uno
nwebster4 in reply to Robo-labsJul 5, 2011. 2:44 AM
Yes it can be done with the arduino uno , why? Because all arduinos have the exact same pinout, even the mega, although the mega has the same pinout it's extended with a lot more pins. So you would be able to do it, and it will work with the same code and lib, I should know... I've got the Uno too :)
bogyman57 says: Apr 18, 2011. 11:38 PM
Excellent 'ible!!!

I built one last Friday night, and spent the weekend playing around with the demo code. I've added a bunch of new patterns, and "subroutineized" everything.

Here's the aformentioned arduino ".pde" file if anyone is interested.

To save the attachment:
Right click on it and select "save link as" and rename it to something more meaningful like "ledcubedemo.pde" (or something like that)

Happy Hacking!
lostalaska in reply to bogyman57Jul 4, 2011. 9:50 PM
Thanks, just finished this guide for the 3x3x3 cube and was using the original code for it. Been tweaking the code slowly to understand how it all works, then I got the bright idea of reading the comments and saw your code example for the 3x3x3.

Seeing different code do similar things has helped me see a different way of handling the drawings/designs. I had a few programming classes in college for C and C++, but it's been a good 15 years since I've done any kind of coding besides simple scripting on rare occasions. Anyways, if I make any significant changes to your code I'll be sure to post it up here off your comment. I built a 4 cube and was hoping I could understand this code well enough to adapt it to my 4 cube I've been playing with some with my Arduino Uno. I'll probably have to make a few changes to the LEDcube.h library, but I've been reading through some guides for building your own libraries. It's a lot to learn, but I've enjoyed the challenges so far.
eragon69 in reply to bogyman57May 12, 2011. 7:44 PM
Im pretty new to Arduino, but when i try to run your program, and upload it to my board, i get an error, saying "ledcube does not name a type"
how would i fix this?
bogyman57 in reply to eragon69May 17, 2011. 12:52 AM
well... I'm assuming it's not the "running the program" part that you get the error on. It's the compilation that happens just prior to uploading that's bombing...

Have you installed the ledcube library as per the original author's instructions?

I hope this helps
4and20chars in reply to bogyman57Apr 27, 2011. 1:18 PM
You code is extremely organized and well put together. I like your "subroutining". I just have one question. To use this with a 4x4x4, would I just have to change you code or also the library. Any help is really appreciated!
bogyman57 in reply to 4and20charsApr 27, 2011. 6:25 PM
Thank you for the compliments, it's been a LONG time since anyone's commented on my coding. I believe going the 4x4 route would require rewriting both my coding examples and the library itself (as well as rewiring the Arduino)
64 LEDs are a lot more than 27.
Perhaps the original author can point the way?
4and20chars in reply to bogyman57Apr 27, 2011. 7:42 PM
Alright, well I already have the cube rewired and before I go back to the original author (if I need to), I have three quick (hopefully) questions.

1. What is byte me?
2. What is byte meMax?
3. Are the horizontal and vertical int arrays patters that the leds go through, since they are the level and col you want to light up?

Thanks Again.
bogyman57 in reply to 4and20charsApr 27, 2011. 8:23 PM
1. me is a throw away byte used for iteration. (apparently you don't get the joke)
2. meMax is the top limit for iterations (loops) so if meMax = 5, then all the routines will repeat 5 times (except the buffered ones because they take longer)
3. Yes
lostalaska says: Jun 28, 2011. 1:49 AM
Thanks for the guide, followed it all and eventually got it all working. This was my first electronics project I've tried, so I wired the NPN transistors incorrectly initially and totally missed placing the library in the "library" folder. I just had to read through the guide a couple times, not any fault to your guide. Just me being a noob.

I'm playing around with the code now and I see the basic theory of how it works and now that's it all together and I'm able to tweak the code. Gonna try a 4x4x4 using 16 gauge wire to build a grid then bend the LED legs so the slide on for easier soldering and hopefully to make the thing a little more structurally solid. I saw some pictures in another LED cube guide in the comments that explained it and had pictures. My 3x3x3 cube I used a jig, but soldering the levels together I bent a few out of square so they don't all line up perfectly.  Still this was totally awesome and thanks!
jlenert says: Jun 14, 2011. 1:57 PM
by the way this was my calculation. B = Beta , Ib = base current , Ic = collector current. B*Ib = Ic say beta is 200 and Ic is 180mA (9*20mA) this would imply Ib is .0009 A. Thus 5/.0009 = Rb = 5.5k. The 5 is 5 volts coming from the Arduino pin.
jlenert says: Jun 14, 2011. 1:53 PM
How do you calculate the resistors for the transistors to be 22k !? please help!
I used 5k and also hooked up one to a 22k and there seems to be no difference!
mertaxoy says: Nov 14, 2010. 9:47 AM
hii can i use this lib with other programm on a atmega16 ?
Simpson_jr in reply to mertaxoyJun 12, 2011. 1:53 PM
You may have to adapt the code depending on the IDE used, but... you could also try to find an Arduino bootloader for the atmega16 and run the Arduino IDE.
MadMurphy says: May 28, 2011. 6:54 PM
This was a great instructable. Thank you.
Anthony96922 says: Apr 19, 2011. 3:56 PM
The arduino program keeps saying 'LedCube' does not name a type. any one has corrections?
4and20chars in reply to Anthony96922Apr 27, 2011. 1:24 PM
On the last page of the instructable where it has the link to download the library, save and extract this to a location on your computer. You should now have a folder called "LedCube". Place this in the "libraries" folder in the android install directory (..\arduino\arduino\libraries). Close and reopen the arduino software, if you don't already have it closed, and recompile your program. That might fix it if you have not already figured out what is wrong.
Anthony96922 in reply to 4and20charsMay 11, 2011. 8:38 PM
Thanks! That helped me! :)
4and20chars in reply to Anthony96922May 12, 2011. 2:44 PM
No problem, hope your project works out. I just got done with a 4x4x4 cube.
ian_jethro98 says: Mar 9, 2011. 10:18 AM
thank you very much for sharing this project...I just got some connection issues because my middle layer doesn't light up...anyway, I'm sure it's just about my wiring....My real problem is that the leds are not bright enough when everything was lit up...I don't know if the value of base transistor is too high or i committed another mistake.....
matt.e.jenkins says: Feb 14, 2011. 12:21 PM
I made your LED Cube and it works great. Thank you very much!
saharok says: Jan 26, 2011. 2:52 AM
Hi!
Why resistor in the base of transistors so huge? This is reduce brightness.
According to my calculations suffice 1,200 ohms.
macnomad84 in reply to saharokJan 30, 2011. 8:59 PM
Hi, how did it work with 1200 ohms? How exactly is the Rb calculated?

Found this formula somewhere and got weird values for hfe ~ 60
Rb = (Vc* hfe)/(5*Ic)

Goddard007 says: Sep 24, 2010. 12:07 PM
This wont work stand alone will it? It only works when plugged into an Ardunio?
Lord_Vek says: Aug 18, 2010. 12:42 PM
Seems cool. I want to try it. But can you explain transistor connections with BCE terms? (BC547 and 2n3904 have reversed pins I think). Or, what transinstor is used in your photos? Thanks in advance.
Lord_Vek in reply to Lord_VekSep 4, 2010. 1:18 PM
Here it is...
3X3 Cube A4.pdf(595x841) 3 MB
Lord_Vek in reply to Lord_VekSep 4, 2010. 1:36 PM
To print, use the .pdf form, not the jpg for better results . I used 2N3904 transistors. 220 ohm registors (I used 100 ohms instead) are going to the nine pads that the columns are connected to (Arduino digital pins 2 to 10). Three 22k are going to pins 11,12,13. We used the two ground pins on the other side, otherwise the shield would be connected only to the one side. Credits are going to a friend of mine, Lefteris also known as "Tallman", who reduced the PCB size on the Eagle CAD. Again, thanks for the instructable and the library.
Lord_Vek in reply to Lord_VekSep 4, 2010. 1:39 PM
Hmmmm... Say, isn't any way to Edit my comments to correct them ?
Lord_Vek in reply to Lord_VekAug 20, 2010. 3:03 PM
Thanks for the answer. I am going to make it.
Lord_Vek in reply to Lord_VekAug 31, 2010. 2:43 PM
There it is, finally. http://www.youtube.com/watch?v=g7GMJoHCSc0 Only I used a PCB, made it like an Arduino shield. Thank you for this project! I enjoyed making it,as well as seeing the result.
Lord_Vek in reply to Lord_VekSep 3, 2010. 2:05 AM
Thanks. What do you think about the white vacuum-formed plastic cover ?
Lord_Vek in reply to Lord_VekSep 3, 2010. 11:03 PM
Next, I think I' ll search youtube for similar cubes and I'll try to duplicate more effects using your library. Problem is I made this in the final days of my vacation, now there isn't so much time... Should I post the PCB I made (with a friend's help) ?
gzip (author) in reply to Lord_VekSep 4, 2010. 9:31 AM
Yeah, please do. The more photos and info the better. If you post the PCB artwork I'm sure someone else would try it out.
gzip (author) in reply to Lord_VekSep 3, 2010. 3:27 PM
The cover is also nice and makes me wonder what's hiding under it. :)
gzip (author) in reply to Lord_VekAug 31, 2010. 8:13 PM
Nice touch with the shield.
gzip (author) in reply to Lord_VekAug 19, 2010. 11:46 AM
2N2222, 2N3904, and BC547 are all pin compatible. Facing the flat side of the transistor the pins are EBC. 2N2222 is used in the photos.
josiahritchie says: Aug 31, 2010. 8:10 PM
Can this class address larger cubes than a 3x3x3? It looks like the code was built with that in mind, but has it been tested by anyone? I've been thinking about a 4 or 5 LED cube, but so far I guess I'd need a shift register and I figure the Library would have to be aware of the shift register. I don't know enough about it to know if it just simply is or if that requires special attention.
gzip (author) in reply to josiahritchieSep 1, 2010. 7:29 PM
The code was written with larger cubes in mind but it'd be a bit lucky if it worked out of the box. Even so, user adumas reported in the comments below that he had it working with a 4x4x4. Post back if you get anywhere with that,
the_burrito_master says: Jul 17, 2010. 1:29 PM
Yes! i ordered an arduino 2 days ago and i got my transistors all rigged along with my resistors! i also built a nice case for it, just gotta put the lid on. I love your coding its so neat and organized I cant wait to sink it to music.
the_burrito_master says: Jul 5, 2010. 3:22 PM
Can I use sts 1979 f2 transistors? I also have a couple sto 1862 te3 will pretty much any transistor that can support the current work?
the_burrito_master in reply to the_burrito_masterJul 5, 2010. 3:31 PM
Also how do you know exactly what transistors you need, is there some kind of site that shows every type and what they are used for?
fruitkid101 says: May 18, 2010. 12:35 PM
so the anodes from the cube go to pins 2 through 10 right? and the ransistor pins go to pins 11-13? level one gnd goes to 11, 2 to 12 and 3 to 13?
gzip (author) in reply to fruitkid101May 18, 2010. 10:18 PM
Yep, that's how the example sketch is set up.
fruitkid101 in reply to gzipMay 18, 2010. 10:26 PM
Kay, Thanks
adumas says: Apr 29, 2010. 2:37 PM
In addition, I was planning on using the max7219 led driver for powering each of the levels... Does that work? I haven't had much success so far. I would appreciate any help you can offer...
gzip (author) in reply to adumasMay 1, 2010. 12:04 AM
It looks like a single MAX7219 can address 64 LEDs so that should get you up 4x4x4. A circuit and library like this one doesn't lend itself well to a chip like that though.

If you still want to go that route the Arduino Playground has some good info on the chip: http://www.arduino.cc/playground/Main/MAX72XXHardware

And this seems like a library worth looking at:
http://www.wayoda.org/arduino/ledcontrol/index.html

adumas in reply to gzipMay 3, 2010. 8:36 AM
Actually, I now have it working with a max7219... Each 64led layer is powered by a single max7219 chip...

I can certainly chain a lot of max chips... But I need to power the final solution by some external source...

CanI separate the power supply to the maxchip and the leds from the arduino?
gzip (author) in reply to adumasMay 3, 2010. 9:26 PM
Glad to hear you have it working with the max chip. I'd be curious to see how you hooked it up. I think you should be able to power the the leds separate from the arduino as long as the two sources share a common ground. It looks like you can also use a single 5v source as long as you make sure the currents are limited appropriately. The 7219 looks like it multiplexes so the overall power required to drive everything may be relatively low.
adumas in reply to gzipMay 2, 2010. 7:44 AM

Hi... I presently use that library and it works great for driving 7-segment displays...

I'm stuck on understanding how I would wire / configure / identify / call the individual levels... I'm wiring up an 8x8 matrix to work with the LEDControl library... I get the rows and columns thing - I just don't know how to add the additional dimension of "levels" and how I would trigger them using the library... Any thoughts?

stalag says: Feb 25, 2010. 12:53 AM
hi gzip, sorry for the newbie questions but, what pins are connected to the three pin headers with numbers 1,2,3 and also what pins are connected to the 220 ohms resistors array numbering 1 to 9. i want to try this, thanks.
gzip (author) in reply to stalagFeb 25, 2010. 9:55 PM
Check out the example sketch. The pins are clearly defined at the top of the file.
Jesse.Hawkins says: Jan 30, 2010. 12:24 PM
Thank you for taking the time to create this excellent instructable!  I had already built my own 3x3x3 LED cube when I found it, however I bookmarked your instructable because of the wonderful code that you included - a reusable animation library built specifically for the Arduino!

Now... how do I use it?  I cannot figure out where to put the files included - LedCube.cpp, ledcube.pde, and the directory LedCube.  For the life of me I can't get anything to compile due to missing/poorly configured files.  Could you tell me what goes where and  into which of the following directories?

F:\My Documents\Arduino\

Am I missing any directories?

Your help would be greatly appreciated.

Thanks!
gzip (author) in reply to Jesse.HawkinsJan 30, 2010. 6:02 PM
Put the LedCube folder under hardware\libraries, relative to the directory where your Arduino executable is located. Once the library is in place you can add it to your project via the main menu; Sketch > Import Library > LedCube.
Jesse.Hawkins in reply to gzipJan 30, 2010. 8:49 PM
Many thanks, that did the trick!  It's neat to see your animations running on my cube.
achollowell says: Dec 8, 2009. 7:32 PM
Man this is cool just got my first Arduino still learning but going to build one soon
flemron says: Nov 15, 2009. 9:18 AM
i was talking about the example sketch he posted,

http://www.gzipped.com/electronics/arduino/code/ledcube/ledcube.pde

gzip (author) in reply to flemronNov 15, 2009. 5:07 PM
Somehow I managed to upload the wrong set of  files. I've replaced them with the correct versions. Thanks for the report.
flemron says: Nov 13, 2009. 4:11 AM

Brilliant design, So simple! how ever i was having a problem with your libary/example code, Most likely user error. The error i got was:

In function 'void loop()':
error: no matching function for call to 'LedCube::lightPerimeter(int)'C:\arduino-0017\arduino-0017\hardware\libraries\LedCube/LedCube.h:27: note: candidates are: void LedCube::lightPerimeter(byte, byte, unsigned int)