Arduino – LED Cube 3x3x3

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

img_0482

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

Schematics Led Cube

img_0524

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:

  1. Click here to Download the library
  2. 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.



Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Enjoyed this project? Stay updated by subscribing our newsletter!

177 thoughts on “Arduino – LED Cube 3x3x3”

  1. 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?

    Reply
    • 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

      Reply
    • 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

      Reply
        • 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

          Reply
          • 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

    • 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???

      Reply
  2. Hi, I’m from Malaysia. Nice stripboard gripper. Only use crocodile clip and hardwire. Why I couldn’t thinking of that idea. Thanks!

    Reply
    • 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!

      Reply
    • 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

      Reply
  3. 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

    Reply
    • 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

      Reply
  4. 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

    Reply
    • 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!

      Reply
        • 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

          Reply
  5. 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

    Reply
    • 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

      Reply
  6. 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.

    Reply
    • 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

      Reply
      • 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

        Reply
        • 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

          Reply
          • 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),
            };

  7. 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)

    Reply
    • 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.

      Reply
  8. 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

    Reply
      • 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

        Reply
    • 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!

      Reply
    • 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

      Reply
  9. 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!

    Reply
    • 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 “-“

      Reply
  10. 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.

    Reply
    • 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

      Reply
  11. 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

    Reply
  12. 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.

    Reply
    • 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.

      Reply
        • 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);

          Reply
        • 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

          Reply
  13. 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

    Reply
    • 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

      Reply
      • 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 🙁

        Reply
        • 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 🙂

          Reply
          • 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 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 🙂

      Reply
  14. 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?

    Reply
  15. 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

    Reply
    • 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

      Reply
  16. 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!

    Reply
    • 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

      Reply
  17. 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

    Reply
    • 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

      Reply
  18. 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

    Reply
    • 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

      Reply
  19. 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?

    Reply
  20. 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.

    Reply
  21. 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..

    Reply
  22. 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.

    Reply
  23. 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.

    Reply
  24. 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!

    Reply
  25. 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

    Reply
  26. 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!

    Reply
    • 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.

      Reply
  27. 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)’

    Reply
  28. 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?

    Reply
  29. 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.

    Reply
    • 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…

      Reply
  30. 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.

    Reply
  31. 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.

    Reply
  32. 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 😉

    Reply
  33. 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.

    Reply
  34. 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 ??

    Reply
  35. 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?

    Reply
  36. 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

    Reply
    • 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

      Reply
  37. 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

    Reply
  38. 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?

    Reply
  39. 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

    Reply
    • 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 🙂

      Reply
  40. 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.

    Reply
      • 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

        Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.