Arduino – LED Cube 3x3x3

136,517

151

64

Introduction: Arduino – LED Cube 3x3x3

About: Author, Blogger, Electronics Enthusiast and Entrepreneur. For complete Electronics Projects and Tutorials go to: https://RandomNerdTutorials.com
In this tutorial I’ll show how you can create your own LED Cube 3x3x3. I’m sure you already saw some similar projects to this one but you never took action and made your own. Now it’s time to make your own!

By the way you can find more project here: http://randomnerdtutorials.com/

Watch this Demo Video of my project:

Step 1: All Parts Required

  • 1x Arduino Board
  • 27x LED’s
  • 1x Stripboard
  • 3x 22k ohm Resistors
  • 9x 220 ohm Resistors
  • 3x NPN Transistors (for example: 2N2222, BC547, 2N3904)
  • Wires
(I included a picture with all the parts)

Step 2: Video Tutorial + Schematics

If you follow my video tutorial I think you'll understand how you can finish each step! If you have any problem please leave a comment below. (I also included my schematics in the pictures)

Step 3: Upload Source Code

Download the library here.

Be sure to download the library and unzip it to libraries. If everything is correct you should find an example in the Arduino IDE software under File > Examples > LedCube > ledcube.

Upload that ledcube example!

Step 4: Final Product

That's the final product!

Did you enjoyed this project? 

Make sure you share this project and leave a comment below... It helps me a lot!



P.S. If you enjoyed this tutorial perhaps you might like my next ones. (Make sure you visit my website for more projects just like this one)

17 People Made This Project!

Recommendations

  • Pi Day Speed Challenge

    Pi Day Speed Challenge
  • Trash to Treasure Contest

    Trash to Treasure Contest
  • Microcontroller Contest

    Microcontroller Contest

64 Comments

0
pesh28
pesh28

8 months ago

This code does not work, even when looking through comments and suggestions made, it still does not work. I have wasted an Arduino board, LED's and other parts which is very frustrating. I am no expert in coding and just a beginner so any help on this would be great.I have found other codes but those circuits dont use any transistors so i'm not sure if they will work.

0
HarshitA7
HarshitA7

5 years ago

hi

while compiling i am getting error as

"

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 resolve

i am using latest arduino on windows

0
paulgreg1
paulgreg1

Reply 12 months ago

Solved it by changing to that code :
static const byte frame1[6] = {0,6, 1,6, 2,6};
static const byte frame2[6] = {0,7, 1,7, 2,7};
static const byte frame3[6] = {0,8, 1,8, 2,8};
static const byte frame4[6] = {0,5, 1,5, 2,5};
static const byte frame5[6] = {0,2, 1,2, 2,2};
static const byte frame6[6] = {0,1, 1,1, 2,1};
static const byte frame7[6] = {0,0, 1,0, 2,0};
static const 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)
};

0
KavinduJ1
KavinduJ1

Reply 11 months ago

it works !!! tnx

0
snehazzz
snehazzz

Reply 3 years ago

Hi Harshit, I am getting the same error. Could you tell me how you fixed it?

0
mahfuz097
mahfuz097

Reply 5 years ago

I am also facing same type of problem. Kindly send the accurate/ error free code :(

0
SzymonD
SzymonD

Reply 5 years ago

Do you found any solutions?

0
AyberkE
AyberkE

Reply 4 years ago

maybe you can check local variables. its seems to be variable problem.

0
mahfuz097
mahfuz097

Reply 4 years ago

Yah. I found the solution.

0
HarshitA7
HarshitA7

Reply 4 years ago

HI
Its very simple by the way.
You just have to get potential difference to blink any of the 27 led.
Put high on the longer terminal and low on the shorter one while coding. Its very easy if you no the basis of embedded C.

0
jiroleminen
jiroleminen

Reply 4 years ago

Hi, I have same problem... Can you send me the fixed code????

0
TanapolR
TanapolR

3 years ago

How to code C++ Ardunio (Led Cube 3x3x3)

0
vinish purohit
vinish purohit

Reply 1 year ago

Sir I'm studying in jiet college jodhpur we have a science fare in which iam making an led cube I need coding for it please send me coding

0
ChomnabK
ChomnabK

4 years ago

why Error compiling for board Arduino

0
MalindaW3
MalindaW3

Reply 3 years ago

Uploading using IDE 1.0.6 worked for me! Thanks!

0
Arslanimtiaz
Arslanimtiaz

3 years ago

sir can you give me truth table of this

0
omkar2309
omkar2309

4 years ago

It was smart to use loops to configure the pin layout but I'm having trouble understanding the pin configuration and having trouble arranging different sequence of my choice. That's it.

simply following the stuff would show me what to do and not teach me how it works, right?

0
vignesh kailas
vignesh kailas

4 years ago

how to output names in this 3x3x3 led cube somebody pls help !!!!!!!!

0
vaasu070
vaasu070

4 years ago

how could i resolve this?

someone help me out.

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