if you're only using single color LEDs, then yes, you will have to make modifications. You don't have as many cathodes, so you don't need to shift out as much data, and you could delete out a lot of the stuff, but it could be done easily if you understand what's happening here
Not a professional cube builder myself but I have to say that you made things really hard for yourself. For starters the arrays wich hold the data can be done much easier with multidimensional arrays like this: Leds[row][leve][bam][colour]; The sizes would be: row = 8, level = 8, bam = 4, colour = 3; This way you have all the cube data in one big array but it is easy to manipulate because of the multiple dimensions. To find a LED you would do Leds[currentLED%8][currentLED/8][BAM][Colour];
Also the BAM counter and BAM bit section of your code can be done quicker like so: BAM_bit = int(BAM_counter/8); This would make your ISR smaller. I hope you don't take my comments the wrong way, I'm a big fan!
Yeah i'm having a blast, there are so many possible ways to animate it. (or let it animate itself) One really fun thing to do is to write a code that animates sort functions. Bubble or cocktail sorts make for really interesting patterns, especially if you make the coordinates and values of the numbers to be sorted random. I'm using height as value to be sorted.
Very clever man. I love it. Logic manipulation is awesome especially when you're pushing it as far as it can go. I wonder what the average cpu load is while your effects are looping. I suspect you're not even taxing the cpu.
ha, no I never take feedback the wrong way! I've actually never used multidimensional arrays? I'll check that out! And yea I do really need to clean some of this up, but wanted to get some thing out there.
Just go to ebay and buy everything you need, it takes some time to make but it's not hard. I just made a 4x4x4 myself and coincidentally this morning i got my transistors so i just started coding my cube. Than i went to youtube and voila, new video in my sub box.
this is an awesome project and tutorial! led(level, row, col, r, g , b) is where magic is. thanks for writing a great function that makes life so easy!!!
Kevin I was thinking. Couldn't we implement PWM as easy as BAM ? Say we have a counter which is incremented with each interrupt. Now say we use an array to store the brightness value for each led. Basically in the interrupt we could just compare the values to the counter and say, if the value is larger than the counter set the corresponding led to high or low otherwise. The only disadvantage I see is the slightly lower refresh rate because of the necessary if statements in the interrupt .
Thanks for the code Kevin I saw that 1 red led is broken on your cube in the video on 5:00 when you go from red to blue on the side where you sit. I've been practising with EAGLE, i have got 1 shift reg with all the resistors and transistors on 1 sided pcb ready so i only have to copy it 8 times on 1 pcb layout so that i have 1 print for 1 color and order that 3 times, gona start tomorrow with the anode pcb
You are an absolute legend. Thanks so much for all the work you have put into this. The level of detail in the code is fantastic and has helped me a lot to understand this. I'm relatively new to electronics and I wanted to jump into a worthwhile project quickly and your videos and code have helped bundles. I think I'm going to do a quick 4x4x4 single colour first and then move on to this monster. Look forward to more of your content.
hmmm, not sure, but yea I can see how that could halt everything up, you're probably yanking yourself out of the SPI writes, so you're basically lapping yourself
Got all the parts, and started programming the thing. I can't seem to get over some flickering in the lower bytes when dimming the leds however. Maybe I should play with the prescaler?
Hey Kevin, I'm about to start buying all the bits and have a go at building one myself, I was wondering if there was anything you would change if you were to build another one, any tweaks or different hardware?
Nicely done and good that you got it to work, but the code is something horrible to read due to your syntax, it is so much out from the normal C/C++ style.
Ha, that's awesome. I'm actually building a 2D LED matrix to do some animations while playing the piano using MIDI. Could you make a video when you are finished, I'm very curious to the results!
Kevin since the state of the leds dont change per bit. Couldn't you scrap the BAM-Bit variable and just set the output once at the BAM-Counter switch statement. It would beuch more efficient.
lets say your LED cube is just one color like blue and not and RGB LED would you still have to tell it to turn the LEDs blue or just make it to where you turn them on and it will do it on its own?
Well it works and you can only go better and more efficient from here. Maybe if you get the code a little more efficient, you can make more processing power demanding animations. I need to make something like this, I'm getting all excited over a thing that is almost on the other side of the world...
I really like the cube but i think that it would be a little bi t to "big" for me. Since you want to sell those with kickstarter (want you?) i really would appreciate a smaller version like 4x4x4 or 5x5x5. I think the code would be pretty much the same but i would be easier to build and also cheaper, though 8x8x8 looks so amazing :)
okay i kinda know what you mean so when you put lets say (0,0,0) would you just take out those last three zeros you put for the colors out and just leave it like (0,0,0) that? thats just the only part confusing me
Me escrevo em seu canal e estou vendo todos seus fantásticos vídeos...Adoro seu trabalho...Seria possível migrar para o arduino mega seu programa para adicionar mais efeitos?já montei meu cubo 8x8x8 rgb e wueria terais memória para adicionar mais efeitos...Muito obrigado por seus excelentes projetos...
I wonder if Arduino could be used with a prorotype interface that controls Christmas light strands on a house. I'm betting it could, it would need a few 5v>110 relays... Thanks for this kick ass info, subscribed!
hiya bro! I wonder if i can use the same code to program 16x16x16 Cube to light up? or will only half of this led light up since the code is made for 8x8x8 cube?
hey, i am making 8x8x8 led cube, but there seem to be a problem, my shift registers aren't giving much current in the output, not even for transistor to amplifier , please help me with these
Nice! This cube project would be much easier if it had some PCB boards. There seems to a lot of interest in this project maybe we can get some boards done or some sort of DIY boards from your work with EAGLE. :>}
hi sir kevin, can i get the 8x8 cube rgb led code, i'm halfway to making 8x8x8, but there is one pcb board that is error, so i want to test it with 8x8 cube, sorry i am a beginner for playing arduino coding :( thanks
If i sent you a code for an animation would you test it and give me a video of it? I am waiting for my LEDs to get here and want to see if my code works... And how can i send you this code?
hey, check out constraining. it could save you some lines of code and it comes in very handy. i cant link to it, but its in the arduino reference site. its called "constrain."
Awesome build! I'm a bit late to the party, but you might be interested in the open-source LED-Cube program antongecko.github.io/quadrum/ It is an editor that helps you create animations that can be uploaded/streamed to the cube through the help of an arduino library.
Haha, thank you, thank you. Maybe in a few months time it is possible that I have time to build one. You could subscribe to my channel so you won't miss it if I upload a video. Ow heck, if I build one I will tell you anyway.
if you're only using single color LEDs, then yes, you will have to make modifications. You don't have as many cathodes, so you don't need to shift out as much data, and you could delete out a lot of the stuff, but it could be done easily if you understand what's happening here
Not a professional cube builder myself but I have to say that you made things really hard for yourself.
For starters the arrays wich hold the data can be done much easier with multidimensional arrays like this: Leds[row][leve][bam][colour];
The sizes would be: row = 8, level = 8, bam = 4, colour = 3;
This way you have all the cube data in one big array but it is easy to manipulate because of the multiple dimensions. To find a LED you would do Leds[currentLED%8][currentLED/8][BAM][Colour];
not going to do the kickstarter thing anymore. I don't really have the time for that now. But yea, the code and cube is definitely scalable
Also the BAM counter and BAM bit section of your code can be done quicker like so:
BAM_bit = int(BAM_counter/8);
This would make your ISR smaller. I hope you don't take my comments the wrong way, I'm a big fan!
what interface do you use? USB?
what microcontroller? an arduino board or another microcontroller with arduino bootloader?
working on that, will post another video when ready!
yea I know... I actually started the schematic in Eagle, but gave up on it and started building instead. I may revisit that soon
Yeah i'm having a blast, there are so many possible ways to animate it. (or let it animate itself)
One really fun thing to do is to write a code that animates sort functions. Bubble or cocktail sorts make for really interesting patterns, especially if you make the coordinates and values of the numbers to be sorted random.
I'm using height as value to be sorted.
you will have to look into the datasheet, it probably has something to do with the timer interrupts
oh cool!! yea, I tried getting on there a while back! thanks for the support!
Very clever man. I love it. Logic manipulation is awesome especially when you're pushing it as far as it can go. I wonder what the average cpu load is while your effects are looping. I suspect you're not even taxing the cpu.
good question, I know you can control individual strands very easily with the arduino
ha, no I never take feedback the wrong way! I've actually never used multidimensional arrays? I'll check that out! And yea I do really need to clean some of this up, but wanted to get some thing out there.
with the way you have all that coded, i'm surprised it runs at as fast of an update rate as it does. it can be optimized soo much.
oh sweet, let me know when you have the schematic ready! and I don't see where the broken LED is? it's probably just the camera angle
Just go to ebay and buy everything you need, it takes some time to make but it's not hard. I just made a 4x4x4 myself and coincidentally this morning i got my transistors so i just started coding my cube.
Than i went to youtube and voila, new video in my sub box.
the first level cannot be on if the anode for that level is OFF. Check all the anode control code
yea man! you're top notch guy! I look forward to your comments now! You should totally build one, or go 10x10x10, or bigger!
Thanks!! I hope the series has helped! post a video response of your cube!
this is an awesome project and tutorial! led(level, row, col, r, g , b) is where magic is. thanks for writing a great function that makes life so easy!!!
yep, always done it that way. No one ever told me the watch goes on the left until the habbit was set in
yea, did I get it backwards somewhere? Thanks for clarifying
Kevin I was thinking. Couldn't we implement PWM as easy as BAM ? Say we have a counter which is incremented with each interrupt. Now say we use an array to store the brightness value for each led. Basically in the interrupt we could just compare the values to the counter and say, if the value is larger than the counter set the corresponding led to high or low otherwise. The only disadvantage I see is the slightly lower refresh rate because of the necessary if statements in the interrupt .
Thanks for the code Kevin
I saw that 1 red led is broken on your cube in the video on 5:00 when you go from red to blue on the side where you sit.
I've been practising with EAGLE, i have got 1 shift reg with all the resistors and transistors on 1 sided pcb ready so i only have to copy it 8 times on 1 pcb layout so that i have 1 print for 1 color and order that 3 times, gona start tomorrow with the anode pcb
You are an absolute legend. Thanks so much for all the work you have put into this. The level of detail in the code is fantastic and has helped me a lot to understand this. I'm relatively new to electronics and I wanted to jump into a worthwhile project quickly and your videos and code have helped bundles. I think I'm going to do a quick 4x4x4 single colour first and then move on to this monster. Look forward to more of your content.
I love the dos type programing, and the new info
Have you seen the other videos in this series? They will answer your questions
hmmm, not sure, but yea I can see how that could halt everything up, you're probably yanking yourself out of the SPI writes, so you're basically lapping yourself
Got all the parts, and started programming the thing. I can't seem to get over some flickering in the lower bytes when dimming the leds however. Maybe I should play with the prescaler?
Hey Kevin, I'm about to start buying all the bits and have a go at building one myself, I was wondering if there was anything you would change if you were to build another one, any tweaks or different hardware?
Nicely done and good that you got it to work, but the code is something horrible to read due to your syntax, it is so much out from the normal C/C++ style.
Ha, that's awesome. I'm actually building a 2D LED matrix to do some animations while playing the piano using MIDI.
Could you make a video when you are finished, I'm very curious to the results!
Kevin since the state of the leds dont change per bit. Couldn't you scrap the BAM-Bit variable and just set the output once at the BAM-Counter switch statement. It would beuch more efficient.
yep, hopefully you're all set now!
eh, about 2-3 months. I only worked a few hours a week on it though, with a lot of distractions
single color would be pretty easy especially if you don't care about brightness. You could just tell the LEDs to turn ON or OFF
yep, that may help, or just speed up the OSCR1A timer
lets say your LED cube is just one color like blue and not and RGB LED would you still have to tell it to turn the LEDs blue or just make it to where you turn them on and it will do it on its own?
Well it works and you can only go better and more efficient from here. Maybe if you get the code a little more efficient, you can make more processing power demanding animations. I need to make something like this, I'm getting all excited over a thing that is almost on the other side of the world...
Really enjoy your projects, Kevin. Thanks for sharing!
thanks, i'll check it out
yea, I guess so? go to my site, and see the contact section
that would be really cool!
exactly! That's what I'm talking about!
Hi your the man
I have a 7x7x7 common cathode rgb can your code work with this a am having trouble with it any thoughts
have u ever thought of selling this? i would so buy it :D nice job man! looks great!
yep, PWM could have been implemented just as easily, this was just interesting to me at the time
How do u hook it up? Where do u get the stuff? Is there a full detailed vid anywhere?
I really like the cube but i think that it would be a little bi t to "big" for me. Since you want to sell those with kickstarter (want you?) i really would appreciate a smaller version like 4x4x4 or 5x5x5. I think the code would be pretty much the same but i would be easier to build and also cheaper, though 8x8x8 looks so amazing :)
okay i kinda know what you mean so when you put lets say (0,0,0) would you just take out those last three zeros you put for the colors out and just leave it like (0,0,0) that? thats just the only part confusing me
A small doubt regarding the LEDs. Do I have to make any changes in the code if i'm using Blue LEDs instead of RGB LEDs ??
Me escrevo em seu canal e estou vendo todos seus fantásticos vídeos...Adoro seu trabalho...Seria possível migrar para o arduino mega seu programa para adicionar mais efeitos?já montei meu cubo 8x8x8 rgb e wueria terais memória para adicionar mais efeitos...Muito obrigado por seus excelentes projetos...
Thank you!
thanks! I may someday
Hey man, where can I download the Library for this code?
Excellent work bro...
Good work Kev, rate your clip man!
Can I get the circuit diagram for the cube? I'm asleep trying to create a cube
I wonder if Arduino could be used with a prorotype interface that controls Christmas light strands on a house. I'm betting it could, it would need a few 5v>110 relays...
Thanks for this kick ass info, subscribed!
Will control them straight out the box. Just dnld the code from arduino IDE, plug in the wires and off she goes. I already made one, and works fine.
hiya bro!
I wonder if i can use the same code to program 16x16x16 Cube to light up?
or will only half of this led light up since the code is made for 8x8x8 cube?
hey, i am making 8x8x8 led cube, but there seem to be a problem, my shift registers aren't giving much current in the output, not even for transistor to amplifier , please help me with these
Hey Kevin is 8khz the max you can get ? I used 5 bit resolution and making interrups any faster seems to halt the whole thing.
Nice, hope you don't mind I told hackaday about your vids :)
How can I make this work for single color LEDs?
Nice! This cube project would be much easier if it had some PCB boards.
There seems to a lot of interest in this project maybe we can get some boards done or some sort of DIY boards from your work with EAGLE. :>}
thanks man!
arduino, it's like C or java
Sir, Have u used arduino uno here or wat (have u used) ?
hi sir kevin, can i get the 8x8 cube rgb led code, i'm halfway to making 8x8x8, but there is one pcb board that is error, so i want to test it with 8x8 cube,
sorry i am a beginner for playing arduino coding :(
thanks
How long is the total time build for this project?
Dudu can i contact you personally to clear some doubt about this project
Could you please advise me, How to change micro controller from ATmega328 to ATmega2560? Can i do it?
If i sent you a code for an animation would you test it and give me a video of it? I am waiting for my LEDs to get here and want to see if my code works... And how can i send you this code?
Epic! Great videos and great work!
osem bro . how can i use these code in single color cube. help me
really appreciable
Hi , I'm using Mega 2650. what are the pins I have to use then ... I fed up with trying hard for 3 weeks with codes... no good. pl help
I have only single coler led I need the same program.. It is possible the how
oh yea for sure! I code like a cave man
Are this cube charlieplexed? Thanks
nope, just regular multiplexing
thanks
Awesome!!! Thanks :)
WOW, AWESOME!!!!!
What program is this? Like the programming thing he is typing into?
Dean Thordarson he is programming for the arduino with the arduino ide.
watch on right hand?
good
thankyou
Would an Uno be enough?
which programing language is this ?
hey, check out constraining. it could save you some lines of code and it comes in very handy. i cant link to it, but its in the arduino reference site. its called "constrain."
plz make a 4*4*4 cube code
wwwoooooooohhh... thank you for the tutorial (Y)
Bro circuit diagram plz
4:58 by switching from blue to red, there broke the red light (bottom right). That's mean. >_>
How about 4x4x4
Awesome build! I'm a bit late to the party, but you might be interested in the open-source LED-Cube program antongecko.github.io/quadrum/ It is an editor that helps you create animations that can be uploaded/streamed to the cube through the help of an arduino library.
Nevermind :x
how to download program document
what program document name
just day dreaming about it, I guess
大大可以提供我8x8x8LED電路跟程式嗎?
謝謝
Haha, thank you, thank you. Maybe in a few months time it is possible that I have time to build one. You could subscribe to my channel so you won't miss it if I upload a video. Ow heck, if I build one I will tell you anyway.