ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

#56 How to build an LED Cube - Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ส.ค. 2024

ความคิดเห็น • 42

  • @omkarbansode6305
    @omkarbansode6305 3 ปีที่แล้ว

    Sir very much thankyou.
    No one has been this much information about the LED CUBE instead of you,
    And it helped alot

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      It's my pleasure! It was so fiddly to construct but it was pretty straightforward (once built) to control.

  • @joeblow2109
    @joeblow2109 6 ปีที่แล้ว

    This is great, nice and simple to get your head around it. Thanks again.

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      Thanks for your post, JOE Blow, good to hear from you.

  • @danljohnston
    @danljohnston 7 ปีที่แล้ว

    Don't know how I stumbled on your channel a few months ago, but am glad I did. Your videos are fun and so well presented. You are a really good teacher. I wish I could grasp this stuff better. Having fun trying. Thanks for taking the time to make these videos.

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      Having fun whilst trying is the key, Danny. We don't always succeed but it's still worth trying. Spent a whole day yesterday experimenting with the ATTiny85 and I2c and LCD screens - some bits worked, some didn't but you will see the result of my efforts in a video in two or three weeks or so. I often wish I could grasp things better too! If there are specific areas that you are having difficulties in the code in my videos do post questions here; or suggest topics that might interest others too. Otherwise the Arduino forum is a great place to get help too. Thanks for your post Danny, and keep having fun!

    • @danljohnston
      @danljohnston 7 ปีที่แล้ว

      My latest "attempt" at a project is a data logger, like a weather station. Living in the south USA, I want to monitor my air conditioning equipment in the attic. My plan is to use several DS18b20's , NRF24L01 radios, a 20x4 LCD display and SD card and RTC. The radio and the SD card are both on the SPI bus and don't like to work with each other. I found others have the same problem making them work together. Might change radios to get something working. The Arduino forum seems to have all these smart people that might be able to help if they stop insulting the new guys. Most rather tell the questioners how dumb they are, have you even googled for that? Learn how to post the code right or I won't read it! All BS.They are (not all ofcourse) just opposite from you and your approach to teaching. Why do they thing people go there for help, BECAUSE THEY DON'T KNOW. Not because they are stupid.
      Enough about that , YOU know more than they do anyway!!!

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      Yes, some of the Arduino Forum experts are very precise in what they will help with (and what they won't do, like homework assignments) and the OPs get short shrift if they don't "follow the rules". But when you consider that hundreds of questions get posted a week you can see why the experts' fuses can get a bit short with OPs who say "I want to run my Arduino to transmit data what do I have to do?", without showing they have even thought about it, or the exact problems they are facing.
      But I feel your frustration too at their less-than-supportive attitude on occasion! As an occasional contributor there I can see both sides of the issue and empathise with both camps. I've sometimes spent some time answering a question yet never get a response from the OP to even let me now he's read my answer, let alone whether he found it useful! How rude!
      I don't know why the nRF20L units and the SD card logger would not play nicely together (is the CS line is being brought low correctly as you address each unit and then high again when finished communicating with it?) If done correctly they certainly *should* work but then again this is electronics! Keep trying various solutions, you'll come up with something I'm sure.

  • @lannonkhau2051
    @lannonkhau2051 6 ปีที่แล้ว

    Mine worked perfectly! thank you so much for the tutorial, you are awesome!

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      Glad to hear it, Lannon. Are you going to expand into a 3 x 3 x 3 cube next (it is considerably more complex but very do-able)? I still have my one that I have never demoed, I really will have to catch up on these things. Thanks for posting, great to hear from you.

    • @lannonkhau2051
      @lannonkhau2051 6 ปีที่แล้ว

      I've created a 3x3x3 Cube without the transistors so I could only make patterns by controlling each column. I'd like to incorporate the transistors so that I could control the rows like I did in the 2x2x2 but I think for this week I'm going to visit your L-293D Tutorial so I can teach the students (at the place that I work) how to use DC motors. Your tutorials are bringing a lot of buzz and excitement to my hometown, we thank you.

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว +1

      Thanks for your post, Lannon Khau, good to hear from you. And long may the buzz in your hometown continue.

    • @lannonkhau2051
      @lannonkhau2051 6 ปีที่แล้ว

      I also had a question, in the for loop when setting up the gpio pins, why do we divide the length of the array by 2?
      for (unsigned int cnt = 0; cnt < ( sizeof layer) / 2; cnt ++) {

  • @erneststock
    @erneststock 6 ปีที่แล้ว

    thank you for this and the other videos

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      Glad you liked this and the other videos, Ernest. I never did demo my 3x3x3 cube with a basic pattern or two; I felt it might be a bit specialist but if you want the code let me know and I'll post it on my GitHub. Thaks for posting.

    • @erneststock
      @erneststock 6 ปีที่แล้ว +1

      well thanks for taking the time to reply . am still finding my way with code .(and typing on keyboard !)

  • @RalphBacon
    @RalphBacon  7 ปีที่แล้ว +1

    A viewer has noted that at video position 16:30 the screen text says I use pin 3 and pin 3 for the layers. Doh! That should read pin 3 and pin 4, of course. Well spotted Dave H!

  • @jeffgortatowsky7155
    @jeffgortatowsky7155 2 ปีที่แล้ว

    I just went though this. Very well done. The only question I have if its not too late, my lower layer is dimmer than the upper yet they are all the same Yellow LEDs. I power the breadboard from the Uno. Ideas? Soldering?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Hey, it's only been 5 years (almost to the day) since I published this video! Still crystal clear in my memory. (I wish).
      Are ALL the LEDs on that layer dimmer? Is the transistor controlling that layer switching on fully? You can test the cube "off-line" as it were by powering it independently (not connected to the Arduino) to see whether the individual LEDs do, in fact, light up correctly. If so, I'd deffo suspect the transistor not turning on fully. Or any limiting resistor(s) being the incorrect value.

  • @thailoz944
    @thailoz944 7 ปีที่แล้ว

    Hi just discovered you on you tube . Just a quick question what IDE do you use in this video ?

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว +1

      +thailoz944
      Welcome to my channel and I hope you like what you see here! If you do, please consider subscribing too (not already).
      Regarding the IDE it's called the Eclipse (Java-based) IDE, which, whilst being very good (especially with the added Arduino add-in) it is not for beginners nor the faint-hearted. There are more details under video #49 "More Pins Please" where another subscriber asks the same question (search for Eclipse on that page). It's quite similar in concept to Microsoft Visual Studio; but I would totally encourage beginners to use the standard Arduino IDE as it is more beginner-friendly. Getting to grips with C++, an Arduino AND a new IDE is definitely a step too far for most. If you're keen though, then have a go, more details and links are in the other comment (and good luck)!

  • @graemepinnock
    @graemepinnock 7 ปีที่แล้ว

    Hi Ralph, great video but I'm left a little confused regarding the code. Is there a reason you didn't use a different variable name in the inner and outer loops? It looks like you have used "cnt" for both.

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      +Graeme Pinnock
      An excellent observation and I hoped no-one would notice! Drat! But it raises an interesting point about 'variable scope'. When a variable (such as cnt) is declared within a 'for' loop (that is, within curly braces), its scope is constrained to that set of braces. So, for example:
      {
      var cnt = 1
      do something else here
      }
      {
      var cnt = 6
      do something else here
      }
      Are perfectly legal constructs as each declaration is scoped by the curly braces (like the ones around a for loop). The first variable named 'cnt' disappears immediately the closing bracket is hit in code execution.
      I've uploaded a tiny example sketch just to illustrate this point (see video description for the link, but it's here: bit.ly/variablescope)
      In hindsight I should, perhaps, have used a different name in the inner loop to avoid confusion but at least now everyone knows about variable scope, so thanks for that question and I hope it has clarified why it works the way it does!

    • @graemepinnock
      @graemepinnock 7 ปีที่แล้ว

      Ralph S Bacon Thanks Ralph, lengthy explanation greatly appreciated.

    • @MyBigThing2010
      @MyBigThing2010 7 ปีที่แล้ว

      Ralph S Bacon basically, anything NOT declared as a global can be used wherever you want in the construct without affecting the overall coding/program because...again...it's not a global declaration....right? ...I learned that on circuit #2 in the beginner Arduino sketches...

  • @ayaayatahir8960
    @ayaayatahir8960 7 ปีที่แล้ว

    Thanks for video! But may i have the cct and code of connection? I need it plz

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว +1

      Not sure what you mean by 'cct' but have a look in the video description for the links and also in the next video #59 that deals with pattern generation. I hope this helps?

    • @ayaayatahir8960
      @ayaayatahir8960 7 ปีที่แล้ว

      Ralph S Bacon sorry cct i mean by it the circuit or digram of connection.. Because i didnt understand the connection

  • @saeedou
    @saeedou 6 ปีที่แล้ว

    Hi
    what i got is if I want turn on any led i have to make the pinMode low and the current will flow from 5v that connected to the transistor to the pin , do not create a problem for the pin?
    and when a pin is in low pinMode its connected to GND?

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      It's been so long since I constructed this I can't remember the details but sinking 20mA per pin is fine. If you want to sink more (as we do for each COLUMN) then we need a transistor so we can light up, say, 3 LEDs at one on different ROWS then we need a transistor to take the current load. If you need more info post the question here an I'll check it out on my return from holiday in a week or so.

    • @saeedou
      @saeedou 6 ปีที่แล้ว

      for example we have 5*5*5 LED cube and we want to turn all the ELDs of one column 5*20mA=100mA right?
      whats will wappend?
      and I have a request from you : if its possible create a video about how to understand a library , the name of functions and what each one does .

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว +1

      Last question first, Saeed, see my video #71 on how to create a simple library and how it all hangs together!
      First question, about lighting up 5 LEDs on different rows but the same column, yes, that's exactly how it works. In my example at least. There may be different ways of doing it, but I think my way is the "standard" way!

    • @saeedou
      @saeedou 6 ปีที่แล้ว +1

      thank you so much

  • @MyBigThing2010
    @MyBigThing2010 7 ปีที่แล้ว +1

    Negative is the short one, being shorted is negative. Also if you made them both equal you can use the cut off piece to make the plus sign out of the cathode leg. And one more ...the obvious flag on the inside is negative cuz it's a pirates flag and pirates are negative...last one I promise...the positive IS longer and has more metal and it's always positive to have "more" ... ;) ...hope that helps some peeps...
    So negative is having less or being a pirate ...-and-...
    Positive is having more and making a plus sign with the extra bit if it was cut off

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว +1

      Argh, Jim m'lad, tiz true that being positive about a negative is definitely better than having a bit cut off. Oh, hang on, Talk Like a Pirate is on Tuesday, 19 September, I'm being premature (no sniggers at the back there). talklikeapirate.com/wordpress/ Great post, MyBigThing2010.

    • @MyBigThing2010
      @MyBigThing2010 7 ปีที่แล้ว +1

      Ralph S Bacon haha....ugh

  • @debaduttadash2349
    @debaduttadash2349 5 ปีที่แล้ว

    Can i use bc 547

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Yes, you can, Debadutta, just about any general purpose NPN transistor should work here. Good Luck!

    • @debaduttadash2349
      @debaduttadash2349 5 ปีที่แล้ว +1

      I am only 11 years old but I love to make electrical projects.I made a home theater,Arduino led chaser, hologram projector, projector, Arduino led cube,air conditioner etc

  • @richardkussin3206
    @richardkussin3206 2 ปีที่แล้ว

    I am just beginning to learn Arduino, and thought this 2x2x2 cube would be very easy. Wrong! There is quite a bit going on inside the code (arrays, functions, etc). I don't want to just build the cube and run it using your code. I want to understand what is going on. I will come back to this project when I am ready. (but I enjoyed watching both videos. Well Done!)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Yes, I might have told you that the 2x2x2 cube was probably not a good beginner's project (thank goodness you didn't try the 3x3x3 😯).
      It is good, however, that you have acknowledged that you must walk before you can run, and the very first thing is to flash that LED, then work upwards with _simple_ (I repeat, *simple* ) projects that show you how to do one thing, eg I2C comms, SPI comms, Wi-Fi, and just getting your head round programming.
      It's an uphill climb but there are many, many resting places en-route to admire the view and progress achieved so far. Good luck, Richard, keep going!

    • @richardkussin3206
      @richardkussin3206 2 ปีที่แล้ว +1

      @@RalphBacon
      Thanks for the thoughtful reply. That is good advice - to start small, and keep plugging away.. I am a 66 yr old retired chem engineer, learning Arduino just for fun. I am amazed at your level of energy! I appreciate you taking the time in your videos to really explain things for the newby. (the only negative is that I am spending a disturbing amount of $$ buying some of the toys I see in your shop!)