In this tutorial I’ll show how you can create your own LED Cube 3x3x3. I’m sure you’ve already seen some similar projects to this one but you never took action and made your own. Now it’s time to make your own!
Parts Required
- Arduino UNO – read Best Arduino Starter Kits
- 27x LED’s
- 1x Stripboard
- 3x 22k ohm Resistors
- 9x 220 ohm Resistors
- 3x NPN Transistors (for example: 2N2222, BC547, 2N3904)
- Wire
You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!
Schematics
Download the Arduino Library
IMPORTANT: You need to download an older version of the Arduino IDE in order to compile/upload the LedCube Library to your Arduino board. Go to this page and download version 1.05 of the Arduino IDE for your operating system https://www.arduino.cc/en/Main/OldSoftwareReleases#previous.
Then follow these instructions:
- Click here to Download the library
- Unzip it to the Arduino libraries folder
If everything is correct you should find an example in the Arduino software under File > Examples > LedCube > ledcube.
Watch this video tutorial
Watch this demo of the final product
Wrapping Up
If you like LED cubes, you may also like how to build an 8x8x8 LED cube using a DIY kit. You can read the full instructions here.
Thanks for reading, you can contact me by leaving a comment.
If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.
this is a cool project dude
iam going to make a 8x8x8
do you think the implementation of the program could be similar to 3x3x3?
Thanks for commenting!
The idea/concept is the same… but you should start to understand how a 3x3x3 works before you go into a 8x8x8.
Check my friend LED Cube. he has a awesome tutorial, youtube.com/watch?v=zS5oZPJVh_o
Thanks for commenting!
The idea/concept is the same… but you should start to understand how a 3x3x3 works before you go into a 8x8x8.
Check my friend LED Cube. he has a awesome tutorial!
youtube.com/watch?v=zS5oZPJVh_o
bro…would you plz provide code for 3x3x3 cube..
You can download the code right in this page…
plz program of ardino cube 3x3x3
Hi Rami,
Feel free to download all my projects at:
https://randomnerdtutorials.com/download
Or simply click one of the buttons (Like/Tweet/+1)
And the code will unlock for free!
Have a nice day,
Rui
Hey, when i upload the code to the arduino program and click on veryfi this gets yellow:
LedCube cube(SIZE, levelPins, colPins);
and says:
ledcube:15: error: ‘LedCube’ does not name a type
ledcube.pde: In function ‘void loop()’:
ledcube:48: error: ‘cubeFrame’ was not declared in this scope
ledcube:48: error: ‘f’ was not declared in this scope
ledcube:48: error: expected primary-expression before ‘]’ token
ledcube:48: error: expected primary-expression before ‘{‘ token
ledcube:48: error: expected `;’ before ‘{‘ token
ledcube:195: error: expected `}’ at end of input
what do i have to do? my led cube are ready to go and i have 3x3x3 super bright blue 3,2v 20ma
Thank for trying my project Simen,
Please re-install the LED Cube library 🙂
That error happens if the Arduino IDE doesn’t recognize the library
ledcube.tk
This is your best bet on getting the fastest way to animate your cube!! both for beginners as well as professionals
why does the program tell me this:
sketch_feb18b.ino:7:21: fatal error: LedCube.h: No such file or directory
compilation terminated.
what shuld i do with this???
Hi bear,
You need to install the LED cube library properly in your Arduino IDE.
Thanks for asking,
Rui
so cool
Thanks so much for your feedback!
I hope you make one of these too!
Thanks so much for your feedback!
I hope you make one LED Cube too!
Hi, I’m from Malaysia. Nice stripboard gripper. Only use crocodile clip and hardwire. Why I couldn’t thinking of that idea. Thanks!
Thanks Muhammad Hafiz!
It’s a good project that you can complete in a few minutes.
and It’s made with parts that you probably already have laying around.
So feel free to make one!
hi.. can you give the code you have used??
[email protected]
Yes you can download all my code for absolutely free… just share this post, and the source code will unlock. or simply enter your email adress and you’ll access a secret page with all the source code for my projects!
Thanks
we are making 3x3x3 led cube with using stm32 .Can you share with us the source code of arduino.PLZ.
DOWNLOADED your code it says does not name type LedCube cube(SIZE, levelPins, colPins); highlighted im new what do i put in here 3×3 27 i have no clue
Hi, thanks for taking the time to download my projects!
you don’t need to change the code.
What you’ve downloaded is not an Arduino sketch. It’s an arduino library.
You need to move everything into the libraries folder of the Arduino IDE.
And then open the Example in the Arduino IDE.
I hope this helps and let me know if this worked for you.
Rui Santos
P.S. I was using the Arduino IDE 1.0.4 version. But It works with the 1.0.5
Do you need to download any sort of software for the arduino board to work and to make different patterns. If thereis can you please write what the software is called.
Thank you
No… It’s all done in the Arduino IDE. You need to change to code and do whatever pattern you want.
Simply download the library and move the library to the Arduino IDE libraries folder. And change the LED Cube example.
I hope this helps!
Thank you that helped. Another question, what 3 things do the transisters connoect to?
Hi Diven,
The 3 things the resistors are connected to is:
the layer of the LED Cube,
the Digital Pin of the Arduino
And Ground Pin
thanks for taking the time to leave a comment on my blog,
Rui Santos
Rui,
Parabéns! Este projecto está muito bacano e o software está escrito de forma fantástica.
I will keep it in English for the sake of your site and future visitors.
I was looking in the code and i couldn’t find where did you define the output level for the pins? I would like to adjust it a little bit, as my cube flashes very dimly..
Thanks and keep up the entusiasm,
Familia
Olá Carlos Familia,
Muito obrigado por testar o meu projecto.
thanks so much for trying my project.
And I know you already figure out the problem!
See you in the next project,
Rui
Rui,
Ignora o meu comentário…. Estava a ulitizar os transistors errados.
Abraço,
Familia
the code which i had downloaded from this website is not working it is having some errors like cubeFrame was not declared in this scope?,expected primary-expression before ‘]’ token? after importing the libraries also…kindly revert us with the solutions as soon as possible.
I’ve just downloaded the code and installed it again and it works fine for me…
try to download the Arduino IDE again and insert the library.
(After you download this library. Extract it, change the name of the folder to something like: LEDCUBE, (it can’t have the slash: “LED-CUBE”, the arduino tells you that).
then move that folder into the Arduino libraries folder.
It works for me and for at least 50 people that tried and sent me pictures of their LED cubes with this exact code.
Let me know if you could make it work.
Thanks for trying my projects,
Rui
Hi, i build today my first cube and cant get ur code running i got multiple error messages. I also reinstalled the Arduino IDE again.
ledcube.pde: In function ‘void loop()’:
ledcube:48: error: ‘cubeFrame’ was not declared in this scope
ledcube:48: error: ‘f’ was not declared in this scope
ledcube:48: error: expected primary-expression before ‘]’ token
ledcube:48: error: expected primary-expression before ‘{‘ token
ledcube:48: error: expected `;’ before ‘{‘ token
ledcube:195: error: expected `}’ at end of input
and if i use an another code just the last three colloms of my cube are lighted up maybe u could help me to finde the fail. If it help i can send u pics of my board and the wire.
Greetz FrozeOne
Seems like you’re not installing the libraries properly….
Please try just one more time. (I’ve just tried myself and it works)
Download the latest Arduino IDE.
Then download the arduino library.
Unzip the library folder.
Change the name of the folder. (Remove the ‘-‘ from the ‘arduino-ledcube-master’ to ‘ledcube’)
Move that folder to the arduino IDE libraries folder.
Re-open the Arduino IDE
Go to the examples > ledcube.
I hope this works for you.
Please send me a picture of your LED Cube I would love to take a look!
All the best,
Rui
this will fix it
byte frame1[] = {0,6, 1,6, 2,6};
byte frame2[] = {0,6, 1,6, 2,6};
byte frame3[] = {0,6, 1,6, 2,6};
byte frame4[] = {0,6, 1,6, 2,6};
byte frame5[] = {0,6, 1,6, 2,6};
byte frame6[] = {0,6, 1,6, 2,6};
byte frame7[] = {0,6, 1,6, 2,6};
byte frame8[] = {0,6, 1,6, 2,6};
cubeFrame* f[] = {
cube.createFrame(frame1, 6, 80),
cube.createFrame(frame2, 6, 70),
cube.createFrame(frame3, 6, 60),
cube.createFrame(frame4, 6, 50),
cube.createFrame(frame5, 6, 40),
cube.createFrame(frame6, 6, 30),
cube.createFrame(frame7, 6, 20),
cube.createFrame(frame8, 6, 10),
};
Dear Rui,
I included the library but still I get the error message
core.a(main.cpp.o): In function `main’:
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to `setup’
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop’
can u assist to save my chrismas project;o)
bye the way have a nice christmas ;o)
Hi Jan,
Thanks, Merry Christmas for your too!
I’ve just downloaded the code and installed it again and it works fine for me…
try to download the Arduino IDE again and insert the library.
(After you download this library. Extract it, change the name of the folder to something like: LEDCUBE, (it can’t have the slash: “LED-CUBE”, the arduino tells you that).
then move that folder into the Arduino libraries folder.
It works for me and for at least 50 people that tried and sent me pictures of their LED cubes with this exact code.
Let me know if you could make it work.
Cara,
Eu conectei todos os fios nas saídas digitais do Arduino e liguei ele, todos eles foram acoplados ao Cubo3x3. Depois disso a saída 12 até a 2 parou de funcionar. As luzes estão piscando normalmente (a ON e L) e a parte de Power também está funcionando.
Não sei porque quando conecto um led, tanto faz se é a perna negativa ou positiva nas saídas que não estão funcionando e uso o meu corpo como GND ainda consigo ver uma pequena luz nele. Será que as queimei realmente?
Bom trabalho desse tutorial e se possível me responda. Da uma mão amiga :p
Outra coisa, por onde voce aprendeu Linguagem C. Agradeceria se me desse o nome do livro ou o site
Boas Vitor!
Eu comecei a aprender Linguagem C com tutorias online do youtuber Thenewboston:
é bom para começar a aprender a sintaxe e como funciona.
Depois existem imensos livros, eu pessoalmente estudo melhor por video e tutoriais em texto online.
Espero que ajude
Ola Vitor,
Obrigado por deixar um comentário e experimentar o meu projecto.
O seu cubo está a funcionar bem, certo?
quando você agarra o LED com a mão, o seu corpo faz de ground e completa o circuito e acende o LED um pouco.
Isso é normal, assim como você bem disse que era isso que estava a acontecer.
Por isso parece-me que o seu arduino está a funcionar bem!
Mas experimente o programa exemplo do blink LED nos vários pinos digitais só para ter a certeza se está tudo bem.
abraço!
Hello…could you tell me wich one is the first layer? the…first…from down to up…or the first one…from the top?
Hi Robert,
Thanks for taking the time to leave a comment.
The first layer is the bottom one.
the third the one on the top.
Schematics:
http://i1.wp.com/randomnerdtutorials.com/wp-content/uploads/2013/08/Schematics-Led-Cube.png
Hi Rui! 🙂 thank you! my led cube works!! I done it right! 😀 thank you again! 😀
Hi Robert!
I’m glad you made it!
that’s awesome, if you have some time please send me a picture of your LED Cube.
I would love to see it you can upload the pic to http://imgur.com/
or any other filesharing service.
Thanks
hi.. can you give the code you have used?? I want study 🙁
[email protected]
You can either download the code by clicking one of the sharing buttons on this page.
Or simply go to this page enter your email.
https://randomnerdtutorials.com/download
and you’ll have access to the secret page right in your email.
If you have any problems just let me know!
Have a nice day Ojan,
Rui
Could you please just email the code? I am having problems unzipping it into Arduino library.
(Already subscribed)
Thanks!
I’ll email you the code right now…
But that should work just fine, simply unzip the file and change the name of the folder…
There’s nothing more to do…
Have a nice day!
Rui
Thanks for your speedy reply Rui!
I’ve changed the name, but still receive the error “Library names must only contain basic letters and numbers…”
I meant by a .txt or .rtf file of the code, or is that not how it is written?
Thanks!
I think you already fixed that, right?
If not try to install and reinstall the library…
with a new Arduino IDE and change the folder name of the library… remove the “-“
Hello,
I’m tested your cube led 3x3x3 with BC547B but dont’t work correctly. When i’m weld level 1, 2, and 3 directly on level structure, it’s work. Why ? There is a diffrent between 2N2222 BC547B.
I have another question. The function lightPulse(1, 0, 100) for example. Switch off the light on level 1 (middle), column 0 (corner) ? or switch on ? thank you.
Hi lejolifou,
I didn’t understand exact what you meant by: “When i’m weld level 1, 2, and 3 directly on level structure, it’s work.”
you’re right both transistors should work just fine… no idea what might be wrong then
lightPulse(level, col, 100);
level (also called layer)
col (column)
Sorry for taking so long to answer I’ve been pretty busy this week.
have a nice day,
Rui
Hello,
I solved my problem. When I passed by the transistors nothing worked. When I welded the pins 11, 12 and 13 directly to the respective levels, it worked. I badly welded ground and a transistor. Now it’s perfect !
But I’ll use port method (http://graoulab.org/wiki/index.php?title=Cube_LED) to make larger cubes. Thank you.
Hi lejolifou,
I’m glad you found a solution and made it work!
Awesome thanks for sharing that resource
All the best,
Rio
Hello There!
I have a very interesting tool to help people design and generate their code for their LED CUBE (3x3x3)
Its brilliant, everything is ready, only the leds have to be connected to the right pins!!!
My LED Cube Code Gen: LEDCUBE.tk
My Email ID: satviksr@ gmail.com
Thanks for sharing!
It looks really cool Satvik.
I’ll give it a try later,
Have a nice day,
Rui
Hello, I’ve got problem with arduino, when i try upload code from https://github.com/gzip/arduino-ledcube/blob/56d6d477f08f7cd371bfc076a20b6aa0eeb7befd/examples/ledcube/ledcube.pde with libraries, my console in arduino write:
“ledcube.pde: In function ‘void loop()’:
ledcube.pde:50:57: error: taking address of temporary array
ledcube.pde:51:57: error: taking address of temporary array
ledcube.pde:52:57: error: taking address of temporary array
ledcube.pde:53:57: error: taking address of temporary array
ledcube.pde:54:57: error: taking address of temporary array
ledcube.pde:55:57: error: taking address of temporary array
ledcube.pde:56:57: error: taking address of temporary array
ledcube.pde:57:57: error: taking address of temporary array”
a didn’t know how to solve it, please help.
Please reinstall your Arduino IDE and try to install your library again.
It should work just fine.
I‘v got the same error with Arduino IDE 1.6.0,
but got no error with Arduino IDE 1.5.2 and Arduino IDE 1.0.3.
I didn’t know how to solve it, please help.
Which error?
It seems to be caused by a compiler change or something in the 1.5.8 version of the arduino IDE. I’ve “fixed” to problem by replacing these lines (48) . I know it’s kinda ugly but I’m not that good at c++ to make a nicer looking solution. The main cause of the problem is the unability to point to temporary created variables, so creating real variables is an easy way to fix it.
cubeFrame* f[] = {
cube.createFrame((byte[]) {0,6, 1,6, 2,6}, 6, 80),
cube.createFrame((byte[]) {0,7, 1,7, 2,7}, 6, 70),
cube.createFrame((byte[]) {0,8, 1,8, 2,8}, 6, 60),
cube.createFrame((byte[]) {0,5, 1,5, 2,5}, 6, 50),
cube.createFrame((byte[]) {0,2, 1,2, 2,2}, 6, 40),
cube.createFrame((byte[]) {0,1, 1,1, 2,1}, 6, 30),
cube.createFrame((byte[]) {0,0, 1,0, 2,0}, 6, 20),
cube.createFrame((byte[]) {0,3, 1,3, 2,3}, 6, 10)
};
to
byte frame1[6] = {0,6, 1,6, 2,6};
byte frame2[6] = {0,7, 1,7, 2,7};
byte frame3[6] = {0,8, 1,8, 2,8};
byte frame4[6] = {0,5, 1,5, 2,5};
byte frame5[6] = {0,2, 1,2, 2,2};
byte frame6[6] = {0,1, 1,1, 2,1};
byte frame7[6] = {0,0, 1,0, 2,0};
byte frame8[6] = {0,3, 1,3, 2,3};
cubeFrame* f[] = {
cube.createFrame(frame1, 6, 80),
cube.createFrame(frame2 , 6, 70),
cube.createFrame(frame3, 6, 60),
cube.createFrame(frame4 , 6, 50),
cube.createFrame(frame5 , 6, 40),
cube.createFrame(frame6 , 6, 30),
cube.createFrame(frame7 , 6, 20),
cube.createFrame(frame8 , 6, 10)
};
cube.lightFrames(f, 8);
It’s works! Thanks a solution!
I use Arduino IDE 1.6.5 on Win7
Thanks for trying! I’m glad everything worked smoothly!
Yes, some people that have reported issues didn’t install the LED cube library properly, so they can’t compile their sketches.
But if you do exactly what I show in the blog post it will work!
Thanks for your feedback Andras. Feel free to post a photo of your LED cube!
I have the same problem:
ledcube.ino: In function ‘void loop()’:
ledcube.ino:51:57: error: taking address of temporary array
ledcube.ino:52:57: error: taking address of temporary array
ledcube.ino:53:57: error: taking address of temporary array
ledcube.ino:54:57: error: taking address of temporary array
ledcube.ino:55:57: error: taking address of temporary array
ledcube.ino:56:57: error: taking address of temporary array
ledcube.ino:57:57: error: taking address of temporary array
ledcube.ino:58:57: error: taking address of temporary array
I use Arduino IDE 1.6.1 on Win7
Reinstall Arduion IDE, with erase data from Arduino folders, didn’t help me.
Did you change the folder name? and removed the “-”
You’re not telling me which is the error… I can’t help you if you don’t say what’s happening…
Problem solved, i’ve run Arduino IDE on linux distro. , but when i run in virtualBox with windows XP, all it’s all right.
Cool!
I’m glad it worked 🙂
Hi Rui.
Excelent tutorial, thank you. I have a question though: Why do you use transistors for the ground instead of connecting directly to the arduino pins?
I’m a beginner in electronics and I like to learn the reason for this kind of stuff
Thanks
Hi Antonio,
thanks for your feedback.
I recommend you to search first how transistor works.
and I’m sure you will understand why you need them in this circuit 🙂
The transistor makes it possible to control the layers easily with the Arduino digital pins
Hi im having some problems with the code, I have watched all the comments and it have helped me one step closer but now its saying:
cc1plus.exe: error: ledcube.cpp: No such file or directory
I have tryed to redownload the code and tryed time after time but im not geting anywere 🙁
Hi Thor,
Seems that you have not installed the arduino library properly.
Please download the Arduino IDE again and the LED Cube library.
And move the LED CUBE library to the arduino libraries folder.
I hope this helps 🙂
Thanks ill try that 🙂
Thanks again for your help.
Ive done what you said but its still saying the same thing 🙁
how is the library folder called?
Remember that i can’t have any “-“.
For example if it’s called, led-cube. The Arduino won’t recognize the library.
But the Arduino will tell you.
Which Operating system are you using?
Hi!
I am beginner in this, so I don”t know what kind of Arduino board should I buy, and what kind of wire.
Can you help me?
Hi Alice,
If you want to start learning Electronics with the Arduino.
I recommend you to buy an Arduino Starter Kit with an Arduino UNO board.
That’s an easy way to get started!
I also recommend you to start with a easier project. Best place to search for arduino project Arduino.cc, instructables.com or youtube.com.
Some kits bring a getting started book that will help you a lot.
I hope this helps 🙂
Thank you!
You’re welcome Alice!
heyy. i have a question. i am no user of arduino board. if we create this project together with my group. is’t easy to implement this without having a experience on using arduino?
Hey Chris,
But have you ever made any electronics?
Like creating circuits, soldering… this means, do you know the basics?
Hi, thanks a lot for you tutorial it was very helpful! Does the process change if I use a perfboard instead of a strip board? Could you also tell me where I should use the 22k ohm resistors, I don’t see them anywhere no the diagram.
Thanks a lot,
Angeliki
You should use a perfboard actually.
It will work just fine .
That’s a really good question I never noticed I forgot to add the 22kohm resistor in the circuit diagram.
Sorry… (it would work just fine without the resistors though)
here’s where you should add the 22k resistors: (to Digital pins 11, 12, 13)
http://screencast.com/t/JDW28q3NXD
Thanks for the helpful comment.
-have a nice day,
Rui
Boas Rui, estou a tentar fazer um cubo igual mas como não tenho nenhum conceito em programação deram me estes erros:
sketch_mar13a.cpp.o: In function `__static_initialization_and_destruction_0′:
17: undefined reference to `LedCube::LedCube(unsigned char, unsigned char*, unsigned char*)’
17: undefined reference to `LedCube::~LedCube()’
sketch_mar13a.cpp.o: In function `loop’:
59: undefined reference to `LedCube::createFrame(unsigned char*, unsigned int, unsigned int)’
59: undefined reference to `LedCube::createFrame(unsigned char*, unsigned int, unsigned int)’
undefined reference to `LedCube::createFrame(unsigned char*, unsigned int, unsigned int)’
undefined reference to `LedCube::createFrame(unsigned char*, unsigned int, unsigned int)’
undefined reference to `LedCube::createFrame(unsigned char*, unsigned int, unsigned int)’
sketch_mar13a.cpp.o:C:\Users\Henrique\Desktop\arduino-1.0.5-r2/ledcube.pde:59: more undefined references to `LedCube::createFrame(unsigned char*, unsigned int, unsigned int)’ follow
sketch_mar13a.cpp.o: In function `loop’:
undefined reference to `LedCube::lightFrames(cubeFrame**, unsigned int)’
undefined reference to `LedCube::lightPulse(unsigned char, unsigned char, unsigned int)’
undefined reference to `LedCube::lightLevel(unsigned char, unsigned int)’
undefined reference to `LedCube::lightRow(unsigned char, unsigned char, unsigned int)’
undefined reference to `LedCube::lightPlane(unsigned char, unsigned int)’
undefined reference to `LedCube::randomLight(unsigned char, unsigned int)’
undefined reference to `LedCube::lightDrop(unsigned char, unsigned int)’
undefined reference to `LedCube::lightPerimeter(unsigned char, unsigned char, unsigned int)’
undefined reference to `LedCube::lightPlane(unsigned char, unsigned int)’
undefined reference to `LedCube::randomColumn(unsigned char, unsigned int)’
undefined reference to `LedCube::enableBuffer(unsigned char)’
undefined reference to `LedCube::fillBuffer()’
undefined reference to `LedCube::invertBuffer(unsigned char)’
undefined reference to `LedCube::randomColumn(unsigned char, unsigned int)’
undefined reference to `LedCube::drawBuffer(unsigned int)’
undefined reference to `LedCube::enableBuffer(unsigned char)’
undefined reference to `LedCube::lightColumn(unsigned char, unsigned int)’
undefined reference to `LedCube::lightColumn(unsigned char, unsigned int)’
undefined reference to `LedCube::lightColumn(unsigned char, unsigned int)’
undefined reference to `LedCube::lightColumn(unsigned char, unsigned int)’
undefined reference to `LedCube::lightColumn(unsigned char, unsigned int)’
sketch_mar13a.cpp.o:C:\Users\Henrique\Desktop\arduino-1.0.5-r2/ledcube.pde:158: more undefined references to `LedCube::lightColumn(unsigned char, unsigned int)’ follow
sketch_mar13a.cpp.o: In function `loop’:
undefined reference to `LedCube::lightSequence(unsigned char*, unsigned char, unsigned int, unsigned char)’
undefined reference to `LedCube::lightSequence(unsigned char*, unsigned char, unsigned int, unsigned char)’
undefined reference to `LedCube::lightSequence(unsigned char*, unsigned char, unsigned int, unsigned char)’
196: undefined reference to `LedCube::lightsOut(unsigned int)’
Se me pudesses ajudar agradecia.
Cumprimentos!
Boa tarde Henrique,
O problema é nao ter instalado a biblioteca do arduino corretamente.
Tente fazer download da versao do software do arduino mais recente.
Faça download da bibloteca que eu pus aqui neste post.
Extraia os ficheiros da pasta .zip
Mude o nome da pasta. (Remova os “-” do nome da pasta do ficheiro)
Em vez de ficar “led-cube-master” fica “led_cube_master” por exemplo ou “ledcubemaster”
e mova essa pasta para a pasta libaries do Arduino IDE.
Reinicie novamente o Arduino IDE e deverá funcionar corretamente.
Abraço,
Rui
Muito obrigado Rui consegui!
A continuação de um bom trabalho 😉
Fico contente que tenha funcionado !
Abraço
Hey Rui.
where do the 22kiloOhm resistors go on the breadboard? I see where the 220kilo Ohm resistors get attached to but I can’t see where the other resistors should be placed.
Thanks!
Hugo
Hey Hugo,
I forgot to add them to the schematics.
Sorry they go to the Digital pins 11, 12 and 13.
thanks for asking,
Rui
Hello, I am a beginner and would like to build a cube. Can you tell me where the 3 resistors > in the schematic they are unrecognizable?
What LEDs did you installed? What voltage are applied to the LEDs >> how can I calculate the resistors?
My LEDs are these >> htp://media.highlight-led.de/products/documents/pdf/26000092.pdf. What resistors should I take since?
Greetings from Germany
Hi Mike,
Sorry for taking so long to answer I’ve been really busy…
Those three resistors (3x 22k ohm Resistors)
Are connected directly to the arduino digital pins 11,12,13
I forgot to add them on my schematics…
The resistors I’m using should work just fine with your LED’s because I was using 5V LED’s and you’re also using 5V led’s.
I hope this helps,
Rui
Hello, I´ve tried download and open that files, but when I verify that that on line 50-60 line writes error, can you help?
Hi tetro,
Make sure you have the latest arduino IDE.
(Please re-download the arduino IDE)
And make sure you install the library on the right folder!
nice working dude!!!
Thank you Tuuguu!
nice working dude!!! hug from Mongolia 🙂
Hello. I want to make a 3x3x3 led cube with atmega8. Could you do a video how to do cube like that, and how to code atmega8 with arduino, please?
Thanks.
Hi Dainius,
The LED cube will work similar to mine,
here’s a good tutorial for what you’re looking for:
http://www.instructables.com/id/LED-Cube-3x3x3-with-ATMEGA8/
Hello Rui. Im looking for something like you posted, but its with really weird code. im looking for code which is .c or .hex, for atmega8 microcontroller, because i don’t know how to upload that code..
Greetings from Idaho! I’m bored at work so I decided to browse your blog on my iphone during lunch break.
I really like the knowledge you present here and can’t wait to take a look when I get
home.
Thanks Nelle!
Where do you buy the stripboard
Link please
Almost every electronic store will sell stripboard
you can find them on Amazon or ebay!
Arduino: 1.5.8 (Windows 8), Placa:”Arduino Uno”
ledcube.pde: In function ‘void loop()’:
ledcube.pde:49:57: error: taking address of temporary array
ledcube.pde:50:57: error: taking address of temporary array
ledcube.pde:51:57: error: taking address of temporary array
ledcube.pde:52:57: error: taking address of temporary array
ledcube.pde:53:57: error: taking address of temporary array
ledcube.pde:54:57: error: taking address of temporary array
ledcube.pde:55:57: error: taking address of temporary array
ledcube.pde:56:57: error: taking address of temporary array
Error de compilación
This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.
Hey thanks for this tutorial! I am almost done, I just have one problem. My leds flashes very dimly. I dont know what the problem is. From the comments above, they have used the wrong transistor for this very dim flashes, but I am using the 2N3904.
Please help me, THANK YOU!
Thank u m8, u helped me to make my own led cube.
Awesome!
Hi Rui,
I’m thinking about building a LED-Cube for a long time now. Finally I found your website and will start pretty soon. So first of all: Thanks alot for your awesome work!!
But before I start, I have a question:
In your Tutorial you write that you use “27 LED’s” and “9 x 220 ohm Resistors”.
But what kind of LED do you use (max. U and I). Is it correct, that there arduino uses a 5V output, so that I can calculate the necessary I of the LEDs?
Thank you alot in andvance for your help!
Alex
i followed your instructions and i got 80% done. Some leds are not light up and i don’t know why, does it caused by the code or something?
My English not really good 🙂 thanks!
Thanks for trying my project.
Do you have a multimeter?
Make sure you check with your multimeter in continuity mode all the connections the LED connections, that’s probably it…
Something missing during the soldering job.
Thank you very, very much!
Hi David,
Thanks for trying my project!
Rui
sir where will i find the program for arduino
hi can you help me i encounter an error
C:\Documents and Settings\Amelia\My Documents\Arduino\libraries\arduino_ledcube_master/LedCube.cpp:18: undefined reference to `operator new[](unsigned int)’
C:\Documents and Settings\Amelia\My Documents\Arduino\libraries\arduino_ledcube_master/LedCube.cpp:19: undefined reference to `operator new[](unsigned int)’
C:\Documents and Settings\Amelia\My Documents\Arduino\libraries\arduino_ledcube_master/LedCube.cpp:20: undefined reference to `operator new[](unsigned int)’
C:\Documents and Settings\Amelia\My Documents\Arduino\libraries\arduino_ledcube_master/LedCube.cpp:28: undefined reference to `operator new[](unsigned int)’
Hi amelia,
You have to install the LED Cube library properly in your Arduino IDE folder.
Thanks for trying my project,
Rui
hey rui ! going to try this led cube.. with my friends.. wish me goodluck if i made it i will show you 😀
Awesome! Let me know how that goes. I would love see a photo of your LED Cube
hey rui….the 2th layer doesn’t lit up.. but the first en third ..and some leds light up…what seem to be the problem? can’t find my mistake .. is it the code of the arduino?
Have you checked all the connections with a Multimeter? Do you have all your LEDs soldered properly?
i built a final year project so i choose to built 4x4x4 and have a music. so can i just replace the arduino using rapsbery pi?
Hi aina,
No, the Raspberry Pi is not a good option to make an LED.
I should use an Arduino or any other microcontroller for yur 4x4x4 LED Cube
Dasn’t apear the code…. i clicked the buttons :'(
Do you have any extension in your web browser that might cause blocking download links?
Thanks alot for the tutorial! I am super excited to work on this project myself however I am confused about the size of the stripboard I should buy. The most common ones I’m seeing on ebay are 94mm x 53mm. Will that size be enough for all the components to fit? I also saw a 90mm x 70mm. Also, I would like to mention I will be doing a 4x4x4 not 3x3x3.
Hi Rahul.
If you want to build you should follow another tutorial for your particular needs and components.
Or you can try to modify mine to work for you.
I’m not sure the exact size of the stripboard to build a 4x4x4 LED Cube…
Hi, Rui!
Thanks for your upload and all the corresponding comments. I really appreciate them, but I have a problem with the code here and I would be really glad if you help me. It may seems stupid, but I am a beginner here, so understand me 😀
Thanks again!
Arduino: 1.6.1 (Windows 8.1), Board: “Arduino Uno”
ledcube.pde: In function ‘void loop()’:
ledcube.pde:49:57: error: taking address of temporary array
ledcube.pde:50:57: error: taking address of temporary array
ledcube.pde:51:57: error: taking address of temporary array
ledcube.pde:52:57: error: taking address of temporary array
ledcube.pde:53:57: error: taking address of temporary array
ledcube.pde:54:57: error: taking address of temporary array
ledcube.pde:55:57: error: taking address of temporary array
ledcube.pde:56:57: error: taking address of temporary array
Error compiling.
I did it !!! And it’s amazing! Thank you, it’s a great idea!I would like to show, but do not know where to send the video, if you want to see, tell your email address.
Hi!
Thanks for this page, it’s easy to understand and easy to make, however, I downloaded the library arduino-ledcube-master, I installed it properly but when I tried the example program, the arduino software give me this error:
ledcube.ino:50:57: error: taking address of temporary array
ledcube.ino:51:57: error: taking address of temporary array
ledcube.ino:52:57: error: taking address of temporary array
ledcube.ino:53:57: error: taking address of temporary array
ledcube.ino:54:57: error: taking address of temporary array
ledcube.ino:55:57: error: taking address of temporary array
ledcube.ino:56:57: error: taking address of temporary array
ledcube.ino:57:57: error: taking address of temporary array
where does it come from?
sorry for my english, I’m french 😉
Hi,
i have installed your project and i move it to the arduino library
but it tell me that i have error :
ledcube.pde:7:21: fatal error: LedCube.h: No such file or directory
compilation terminated.
Erreur lors de la compilation.
good job ..
thank you for this project
the library for the cube doesn’t seem to work anymore i reinstalled 3 times all i get is this error:
ledcube.pde: In function ‘void loop()’:
ledcube.pde:49:57: error: taking address of temporary array
ledcube.pde:50:57: error: taking address of temporary array
ledcube.pde:51:57: error: taking address of temporary array
ledcube.pde:52:57: error: taking address of temporary array
ledcube.pde:53:57: error: taking address of temporary array
ledcube.pde:54:57: error: taking address of temporary array
ledcube.pde:55:57: error: taking address of temporary array
ledcube.pde:56:57: error: taking address of temporary array
Error compiling.
any ideas whats wrong ??
I get the same error. Have you sorted it yet? Nothing i do seems to work. I would use a different code however my build is for that code.
Rui, any ideas how to fix this??
Try with an older version of the Arduino IDE. Go to the ARduino website and download a version 1.01.
Then try to compile the code again
Hi there
I just finish set up 3x3x3 LED Cube but i got a little problem with code.. I am download your code and I try to fingure out what is error I am getting.?
Error running
LED_Cube_3x3x3.app:202:1 :error: expected initialiser before ‘getCole’
When I look for getCole . I think its not define mean. Do you know getCole mean?
can I build with china arduino
Yes!
hey, I tried this project and it gave me this error: Arduino: 1.6.5 (Windows XP), Board: “Arduino Nano, ATmega328”
ledcube.pde: In function ‘void loop()’:
ledcube:49: error: taking address of temporary array
ledcube:50: error: taking address of temporary array
ledcube:51: error: taking address of temporary array
ledcube:52: error: taking address of temporary array
ledcube:53: error: taking address of temporary array
ledcube:54: error: taking address of temporary array
ledcube:55: error: taking address of temporary array
ledcube:56: error: taking address of temporary array
taking address of temporary array
how to fix this? Thank you in advance
Make sure you install the library properly and restart your Arduino IDE. You can also try with an older version of the Arduino IDE. Go to the ARduino website and download a version 1.01.
Then try to compile the code again
thnx i will make 1 for sure…nd hope ur help
Thanks for trying my projects!
you are great
Thanks for your feedback!
hi
it is really great to build it
I write a generator to generator the code
w18.loxa.edu.tw/ksstp92151/LED%20CUBE333.html
i will be easier
Thanks for sharing!
Rui
Hello Rui,
I got this error when i make the compilation: exit status 1
taking address of temporary array could you help me please?
Thanks
Try to upload the sketch using an older version of the Arduino IDE as I recommend in the blog post and make sure you install the LED Cube library properly.
Thanks!
Rui
Thanks for your answer Rui!
I follow your instructions and it worked! (i used version 1.01 of Arduino ide)
Hello Rui,
I finished the led cube i linked everything properly but i send the code to the Arduino nothing happen!
Could you help me?
Hey!
I did what you said, to put the library in examples and then: file –> examples–>LedCube –>ledcube
after this, I wanted to check the “code” and the programm says:
ledcube:15: error: ‘LedCube’ does not name a type
ledcube.pde: In function ‘void loop()’:
ledcube:48: error: ‘cubeFrame’ was not declared in this scope
ledcube:48: error: ‘f’ was not declared in this scope
ledcube:48: error: expected primary-expression before ‘]’ token
ledcube:48: error: expected primary-expression before ‘{‘ token
ledcube:48: error: expected `;’ before ‘{‘ token
ledcube:195: error: expected `}’ at end of input
so I don´t have an idea what to do, I followed your steps but it dosn´t work.
Can you help me?
Are you using a older version of the Arduino IDE to compile your code?
Have you double checked that you installed your library in the right folder?
Thank you,
Rui
Hey!
I am using the version 1.05, yes I think I installed the lybreries in the right place.
Thanks
Shalai
Do you have a wiring diagram of the LEDs? I can’t tell how you soldered those LED leads together into a cube from those pictures. Need to know which is cathode and anode, etc. Thanks
please could you send me code
You can download the code from this page…
hi
can you show me full map?
I don’t know how can I make without circuit map?
tanks
I don’t have that prepared.
Thanks for asking,
Rui
Many thanks for your share on blue tooth control
you’re welcome!
Thanks for reading,
Rui
Hello guy, with which programm do you make the schematics?
Just search for “Fritzing.org”
Which programm do you use for programming? Is it possible to programm it with Energia?
Have a nice day! Cheers.
It was uploaded using Arduino IDE version that is described in the blog post, I’ve never used Energia.
Thanks,
Rui
I am intrested in electronics please send updates thankyou
I will! Just make sure you subscribe here: https://randomnerdtutorials.com/download/
Great…I love this…
Thank you for reading Ed!
Please send me the codes for this 3×3×3 led cube through Email
You can download the code directly from this web page in the code section…
Thanks,
Rui
how to unzip to arduino libraries folder?
Hi.
If you’re having difficulties installing Arduino libraries, you can follow this tutorial on the Arduino official website: arduino.cc/en/Guide/Libraries
I hope this helps.
Regards,
Sara 🙂
How big should the stripboards be for this project?
It depends on your LEDs size… You need to measure how much space will your LEDs use. Thanks for asking!
Hello dear friend, thank you very much for the video you created. I built my cube and I only have trouble with code. Please explain very clearly about compiling.
The other question I had was how to install the libraries of the cube?
Hi Barry.
This project was created a few years ago. So, it is a bit outdated.
The code we were using was part of an old version of Arduino IDE – version 1.0.5 that you can download here: arduino.cc/en/Main/OldSoftwareReleases#previous
Then, you should find the code in your Arduino IDE under File > Examples > LedCube > ledcube.
I haven’t tested this and I don’t know if this is still working.
But these were the instructions we’ve followed a few years ago.
Regards,
Sara