How To RGB 8x8x8 LED CUBE - The CODE!

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 109

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    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

  • @JurriaanPetersen
    @JurriaanPetersen 11 лет назад

    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];

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    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

  • @JurriaanPetersen
    @JurriaanPetersen 11 лет назад

    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!

  • @Vaandervald
    @Vaandervald 11 лет назад +1

    what interface do you use? USB?
    what microcontroller? an arduino board or another microcontroller with arduino bootloader?

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    working on that, will post another video when ready!

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yea I know... I actually started the schematic in Eagle, but gave up on it and started building instead. I may revisit that soon

  • @molomono
    @molomono 11 лет назад

    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.

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    you will have to look into the datasheet, it probably has something to do with the timer interrupts

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    oh cool!! yea, I tried getting on there a while back! thanks for the support!

  • @jstro-hobbytech
    @jstro-hobbytech 2 года назад

    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.

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    good question, I know you can control individual strands very easily with the arduino

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    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.

  • @OtakuSanel
    @OtakuSanel 11 лет назад

    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.

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    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

  • @molomono
    @molomono 11 лет назад

    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.

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    the first level cannot be on if the anode for that level is OFF. Check all the anode control code

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yea man! you're top notch guy! I look forward to your comments now! You should totally build one, or go 10x10x10, or bigger!

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    Thanks!! I hope the series has helped! post a video response of your cube!

  • @maskman4821
    @maskman4821 7 лет назад

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

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yep, always done it that way. No one ever told me the watch goes on the left until the habbit was set in

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yea, did I get it backwards somewhere? Thanks for clarifying

  • @VincentTerra
    @VincentTerra 11 лет назад

    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 .

  • @ikweetnietwatnie
    @ikweetnietwatnie 11 лет назад

    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

  • @WiZeR911
    @WiZeR911 11 лет назад

    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.

  • @johnthorp2289
    @johnthorp2289 9 лет назад

    I love the dos type programing, and the new info

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    Have you seen the other videos in this series? They will answer your questions

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    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

  • @VincentTerra
    @VincentTerra 11 лет назад

    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?

  • @StoneBoneAndFire
    @StoneBoneAndFire 11 лет назад

    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?

  • @JaakkoF
    @JaakkoF 7 лет назад +1

    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.

  • @ThinkCreativ
    @ThinkCreativ 11 лет назад

    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!

  • @VincentTerra
    @VincentTerra 11 лет назад

    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.

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yep, hopefully you're all set now!

  • @Kevindarrah
    @Kevindarrah  11 лет назад +1

    eh, about 2-3 months. I only worked a few hours a week on it though, with a lot of distractions

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    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

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yep, that may help, or just speed up the OSCR1A timer

  • @ChayalimKdoshim
    @ChayalimKdoshim 11 лет назад

    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?

  • @JurriaanPetersen
    @JurriaanPetersen 11 лет назад

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

  • @baduncadonk
    @baduncadonk 9 лет назад

    Really enjoy your projects, Kevin. Thanks for sharing!

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    thanks, i'll check it out

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yea, I guess so? go to my site, and see the contact section

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    that would be really cool!

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    exactly! That's what I'm talking about!

  • @johnnyfeeliliken9826
    @johnnyfeeliliken9826 3 года назад

    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

  • @vane22593
    @vane22593 11 лет назад

    have u ever thought of selling this? i would so buy it :D nice job man! looks great!

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    yep, PWM could have been implemented just as easily, this was just interesting to me at the time

  • @JeweleryPower
    @JeweleryPower 10 лет назад

    How do u hook it up? Where do u get the stuff? Is there a full detailed vid anywhere?

  • @LegendaryZable
    @LegendaryZable 11 лет назад

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

  • @ChayalimKdoshim
    @ChayalimKdoshim 11 лет назад

    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

  • @VarunKini
    @VarunKini 11 лет назад

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

  • @ernandofranco8448
    @ernandofranco8448 Год назад

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

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    Thank you!

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    thanks! I may someday

  • @EAGLEHORDER
    @EAGLEHORDER 8 лет назад

    Hey man, where can I download the Library for this code?

  • @umairahmedkhan2864
    @umairahmedkhan2864 11 лет назад

    Excellent work bro...

  • @drusle6
    @drusle6 11 лет назад

    Good work Kev, rate your clip man!

  • @suronmaharjan
    @suronmaharjan Год назад

    Can I get the circuit diagram for the cube? I'm asleep trying to create a cube

  • @calibermoon
    @calibermoon 11 лет назад

    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!

    • @americanpsychosis11
      @americanpsychosis11 4 года назад

      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.

  • @Neptunus68
    @Neptunus68 10 лет назад

    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?

  • @Shanujainl293d
    @Shanujainl293d 8 лет назад

    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

  • @VincentTerra
    @VincentTerra 11 лет назад

    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.

  • @sonicase
    @sonicase 11 лет назад

    Nice, hope you don't mind I told hackaday about your vids :)

  • @americanpsychosis11
    @americanpsychosis11 4 года назад

    How can I make this work for single color LEDs?

  • @COMMANDR1701A
    @COMMANDR1701A 11 лет назад

    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. :>}

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    thanks man!

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    arduino, it's like C or java

  • @siddheshpatankar9498
    @siddheshpatankar9498 10 лет назад

    Sir, Have u used arduino uno here or wat (have u used) ?

  • @basitdoank3030
    @basitdoank3030 4 года назад

    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

  • @gabdacasin3407
    @gabdacasin3407 11 лет назад

    How long is the total time build for this project?

  • @IbrahimAli-pd4eg
    @IbrahimAli-pd4eg 6 лет назад

    Dudu can i contact you personally to clear some doubt about this project

  • @piratpeankarn1840
    @piratpeankarn1840 10 лет назад

    Could you please advise me, How to change micro controller from ATmega328 to ATmega2560? Can i do it?

  • @tzq33tdq
    @tzq33tdq 11 лет назад

    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?

  • @adimeshort
    @adimeshort 10 лет назад

    Epic! Great videos and great work!

  • @lovethakur1301
    @lovethakur1301 5 лет назад

    osem bro . how can i use these code in single color cube. help me

  • @manpreetsingh-yg7bb
    @manpreetsingh-yg7bb 8 лет назад

    really appreciable

  • @ratnet73
    @ratnet73 11 лет назад

    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

  • @lovely2561
    @lovely2561 6 лет назад

    I have only single coler led I need the same program.. It is possible the how

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    oh yea for sure! I code like a cave man

  • @hklausen
    @hklausen 10 лет назад

    Are this cube charlieplexed? Thanks

    • @Kevindarrah
      @Kevindarrah  10 лет назад

      nope, just regular multiplexing

  • @MuhammadAmin-th4bp
    @MuhammadAmin-th4bp 9 лет назад

    thanks

  • @tzq33tdq
    @tzq33tdq 11 лет назад

    Awesome!!! Thanks :)

  • @efrainpuerta2739
    @efrainpuerta2739 6 лет назад

    WOW, AWESOME!!!!!

  • @deanthor
    @deanthor 10 лет назад

    What program is this? Like the programming thing he is typing into?

    • @jakewest4472
      @jakewest4472 9 лет назад

      Dean Thordarson he is programming for the arduino with the arduino ide.

  • @Gattomorto12
    @Gattomorto12 11 лет назад

    watch on right hand?

  • @dandien88
    @dandien88 11 лет назад

    good
    thankyou

  • @HappyHermitt
    @HappyHermitt 2 года назад

    Would an Uno be enough?

  • @11STANE11
    @11STANE11 11 лет назад

    which programing language is this ?

  • @Chaz393
    @Chaz393 11 лет назад

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

  • @snehasishbiswas7041
    @snehasishbiswas7041 4 года назад

    plz make a 4*4*4 cube code

  • @Dinukaism
    @Dinukaism 11 лет назад

    wwwoooooooohhh... thank you for the tutorial (Y)

  • @Graphic-Tech-Art
    @Graphic-Tech-Art 5 лет назад

    Bro circuit diagram plz

  • @DustyJinx
    @DustyJinx 10 лет назад

    4:58 by switching from blue to red, there broke the red light (bottom right). That's mean. >_>

  • @jdosjk5790
    @jdosjk5790 6 лет назад

    How about 4x4x4

  • @lizardman3283
    @lizardman3283 4 года назад +1

    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.

  • @VincentTerra
    @VincentTerra 11 лет назад

    Nevermind :x

  • @keshavakl4985
    @keshavakl4985 7 лет назад

    how to download program document

  • @Kevindarrah
    @Kevindarrah  11 лет назад

    just day dreaming about it, I guess

  • @719470
    @719470 11 лет назад

    大大可以提供我8x8x8LED電路跟程式嗎?
    謝謝

  • @JurriaanPetersen
    @JurriaanPetersen 11 лет назад

    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.