Arduino powered LED Mask with FastLED [Part 1] - How to write code for an irregular matrix

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

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

  • @johnvargo8050
    @johnvargo8050 4 ปีที่แล้ว +2

    So, I was having trouble grasping these irregular matrix concepts from all of the web sites I've been reading. This video finally brought it all into focus for me. A thousand thank you's, this was really helpful. I'm making a wall art piece with columns 3-4-5-6-5-6-7-8-7-6-5-6-5-4-3 land I knew I needed an irregular matrix but had no idea where to go from there. Thanks again!

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      Thanks John, I hope you can build something amazing!

  • @jerryhalasz
    @jerryhalasz 4 ปีที่แล้ว +2

    I have not seen a better tutorial for creating an LED mask. High 5 to you sir!

  • @andrewjames2569
    @andrewjames2569 11 หลายเดือนก่อน

    This is has been extremely helpful as Ive been digging for info on how to map leds and irregular shapes, thank you!

  • @Preske
    @Preske 4 ปีที่แล้ว +6

    the sound reactive one is my favorite :D

  • @jstro-hobbytech
    @jstro-hobbytech 2 ปีที่แล้ว

    I asked a question about binary udls the other day on one of these videos. Disregard. It was quite fun learning about it because I learned alot of other stuff I never knew.

  • @holbylarsen
    @holbylarsen 3 ปีที่แล้ว +1

    This works great. Thank you so much for sharing! The irregular matrix tool is a godsend as my custom PCBs are highly irregular :)

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

      No worries, yeah, that tool is a lifesaver!

  • @howardgregory892
    @howardgregory892 3 ปีที่แล้ว +2

    Fantastic ideas and great instructions so thankyou for helping me in the Arduino path - I think !
    Your LED mask demo inspired me to make an LED coat as I could not solve the irregular matrix in my mind until I saw your post.
    The button info was great too as this will help - ALOT with the design!
    I have your code running on the first panel perfectly thankyou! (9 x 24) vertical serpentine and looks great ....... but the UNO dies as the row size increases. (43 x 24 irregular matrix in total) and is out of Memory.. so upgraded the board to a Mega which easily takes the code as you would expect
    If I upload the same code onto an Arduino Mega it simply wont run at all, even though it runs fine on the UNO
    I have changed the "j" to a uint16_t j from 8 as I exceed 255 but that gives not joy... I cant solve why it Runs on the Uno but not on the Mega
    Do you have any ideas - I am trying the Arduino forum and not getting very far!

  • @DRHall-rn3sb
    @DRHall-rn3sb 4 ปีที่แล้ว

    Nice explanation of the design, I have got a fire routine that is basically generated on the fly but can control it with variables to get better flicker and strands leaving the main fire.
    i will make my 16x16 matrix equals yours by turning off the unused leds. I will email you the code once I am happy with the adjusted code.
    As for covering it, use cling film, then mold features using clear latex that is paintable or foggy, this would be good if an area fails you can just remove the latex and access the leds. Latex will need studs or some way to hold it on. Great to see this.

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      Molding latex over it is a good idea, definitely easyish to remove if necessary. I tried a number of fire routines on it including the usual fire2012 one and found this one looked the best. I also disabled side to side motion of the flames as it just didn't look that good on such a low res matrix. Happy to see what you've come up with though!

  • @scottpaynter2219
    @scottpaynter2219 3 ปีที่แล้ว +1

    To cover the mask you could use Wonderflex Thermoplastic. It's a plastic which becomes soft and malleable when heated and diffuses light really in a way which you can still make out the LEDs.
    If you image search for "wonderflex thermoplastic led mask" you'll see what i mean.

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      I gave the mask to a friend, and he's customised it similar to what you have suggested and it looks great. Thanks for the comment

  • @Technochris0
    @Technochris0 3 ปีที่แล้ว +2

    Awesome video, do you have experience with an irregular strip? I have a strip with gaps, sections that go forward and backwards, and groups of leds that need to combined. I wrapped the led strip inside a sign that isn’t in a matrix or straight line. More like circles and shapes with a single seamless strip.

  • @getyerspn
    @getyerspn 4 ปีที่แล้ว +3

    Wow that's a great find , I've been 'making' my own pixel maps for my pixel trees for years....this will be soooo much easier...I never even though to search for a ready made pixel map generator ...I feel silly now.
    Can't thank you enough...
    No sure about sealing the leds in epoxy ..would make it a pita when one or two inevitably fail.
    The vac forming of a removable cover sounds difficult to get right but could be more practical..
    If you just want environmental protection from moisture then conformal coating like DCA SCC3 from electrolube would work.
    Anyway nice helpful video.. thanks

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +2

      I think you're right about the epoxy, I generally dislike doing anything like that which I can't reverse later! I'll have a play with some ideas and see what I think might work.

    • @TomS699
      @TomS699 4 ปีที่แล้ว

      Weird how people are just seeing this tool now. It was very popular on Reddit and when Google+ was out

    • @costynvd
      @costynvd 4 ปีที่แล้ว +1

      @@TomS699 Weird, I've been a FastLED lurker for years and hadn't seen it before! @Scott: It's a little late for this project, but you could use WS2813s for a next project. Dual data line (main and backup). Less annoying if one fails.

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

    great tutorial, thanks
    Is it possible to make a digital clock with the same logic and make the same patterns? (esp the firs pattern)

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

      It's possible to make anything! Good luck :)

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

    this video is AWESOME!

  • @cine-lights
    @cine-lights 4 ปีที่แล้ว +1

    Very Very original and great video... Great build scott..., i am aiming for a man cave sometime near the end of this year..., this would look cool in it...

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      Thank you :) I'm sure with your love of flashing lights you could throw one of these together for the man cave!

    • @cine-lights
      @cine-lights 4 ปีที่แล้ว

      @@ScottMarley Just had the mask arrive today, seriously lacking leds though, now due to the lack of time i have they will sit in a corner and gather dust lol

    • @cine-lights
      @cine-lights 4 ปีที่แล้ว

      which version of fastled and arduino are you using? quite a few errors popping up ..
      Drops.h:24:36: error: could not convert '(const uint32_t*)(& OceanColors_p)' from 'const uint32_t* {aka const long unsigned int*}' to 'CRGBPalette16'
      CRGBPalette16 currentPalette = OceanColors_p;
      ^
      In file included from C:\Users\Mannys\Desktop\Mask\Mask.ino:84:0:
      Noise.h:17:36: error: could not convert '(const uint32_t*)(& PartyColors_p)' from 'const uint32_t* {aka const long unsigned int*}' to 'CRGBPalette16'
      CRGBPalette16 currentPalette = PartyColors_p; // Starting palette
      ^
      exit status 1
      Any ideas ?

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      @@cine-lights the latest I guess, 3.003.003. I'll have a look shortly and see if I get anything like that. Not sure I do as it would not have compiled!

    • @cine-lights
      @cine-lights 4 ปีที่แล้ว

      @@ScottMarley i just upgraded to the latest version of fastled and arduino and getting the error..., i was using a slightly older version and had other errors too.... the simple version works no probs.., no rush, if all else fails could you throw over a hex / compiled version - im using a nano as your are

  • @MoVil-s5t
    @MoVil-s5t ปีที่แล้ว

    Hello, Newbie question as I am just starting off. I am able to get the matrix to work with the rainbow pattern. I am having a hard time trying to figure out how to only put the fire pattern on the matrix. I not sure where to replace the rainbow pattern for the fire pattern in the code. I do not want to use classes, I simply want to use the fire pattern on the matrix. If you could please explain where to change it on the code, that would great. Thank You once again!

  • @maximilianogaggini5959
    @maximilianogaggini5959 ปีที่แล้ว

    Awesome project man. Can i ask you the version of all 3 libraries? i´m having problems compiling. THX!

  • @ClaytonDarwin
    @ClaytonDarwin 4 ปีที่แล้ว +1

    Love it. 👍 I'm going to have to give that a try.

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      Would love to see what you make!

  • @deverostv5046
    @deverostv5046 4 ปีที่แล้ว +1

    amazing job, thanks for sharing with us

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

    Perfect tutorial, exactly what i was looking for! Is there a way to change effect? I mean something like Glediator, but with an irregular matrix, is it possible? thank you!

  • @Coltography
    @Coltography 4 ปีที่แล้ว

    Would love to see you revisit this with an ESP32. I can't help but think there's a ton of potential here, you could have an app control "facial expressions" and crying animations or something cool if you had higher density pixels covering the entire mask!

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      Replacing the Arduino with and ESP would be straightforward, just 3d print a different case for it. Problem is, I don't have time to add new patterns and stuff! The code is all there if you'd like to have a go? Not sure about increasing the pixel density though, the power consumption would increase hugely, so I'd have to rethink how the power is distributed, and soldering all those strips together on a curved surface would be miserable! It does have a lot of potential though. Maybe one day I'll get inspired again to have another go!

    • @Coltography
      @Coltography 4 ปีที่แล้ว

      @@ScottMarley Wish you had the time, I'd gladly collaborate with you on this!
      ! I've 3D printed a translucent mask before and lined the entire inside with ws2812B pixels but never got the software side of things worked out. I'll be teaching myself some things later this year I guess.... :P Keep up the awesome work!

  • @MegaMario0007
    @MegaMario0007 4 ปีที่แล้ว +1

    For the cover, use Fossshape 300

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      I had no idea that was a thing! Would it be transparent enough to show the LEDs through?

    • @MegaMario0007
      @MegaMario0007 4 ปีที่แล้ว

      @@ScottMarley check out instagram.com/wow_elec_tron?igshid=mrldp6j1no68 , He makes his masks with it

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      Great, they look amazing!

  • @50shadesofskittles9
    @50shadesofskittles9 3 ปีที่แล้ว +1

    Nice B-Roll buddy! :)

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

    Great video, and fun project. I've subscribed and am working my way through your videos to better understand the possibilities of FastLEDs and Ardiuno.
    This is a bit off topic, but can you use the irregular matrix on a regular matrix so only certain pixels light up for some patterns but all of them light up for others?

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

      Thank you! There might be a cleverer way to do this, but an easy way would be to make your pattern fill the matrix as usual, then set the pixels you want switched off to black before calling FastLED.show(). You could store the index numbers of the 'off' pixels in an array, and just loop through this setting them all to black.

  • @leemarsh5258
    @leemarsh5258 4 ปีที่แล้ว

    Hi Scott, love your projects. Quick newbie question - what wire are you using between the copper strip and the led connectors? I've built a LED matrix and want to use your copper tape method to distribute power/gnd but I'm struggling to figure out what wire to use. I see with your mask you seem to mainly be using bare wire - what gauge is that and is it pre-tinned? Sorry for what is no doubt a really basic question. Thanks!

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      No worries, it's just single core copper wire, that I covered in a thin layer of solder. That way it solders quickly so not too much heat ends up in the copper tape. I don't know what guage it is, but the insulation is 1.1mm diameter and the core is 0.6 mm diameter if that helps. Probably doesn't matter too much here unless you're making an enormous matrix!

  • @Coltography
    @Coltography 4 ปีที่แล้ว +1

    This is so cool, I've made a mask similar to this but just used the default demoreel stuff for fastled. How did you get the sound reactive animations at the end?

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      Take a look at the GitHub link in the description, it's the pattern called 'Sound.h'. it's really basic and could be expanded a lot but I just wanted to get the video done. It just looks for a sound level between fixed points and draws the appropriate image. Really these points should be determined dynamically and I'm sure I'll do it some point!

  • @umit4334
    @umit4334 4 ปีที่แล้ว

    very cool . . do you have WS2811 real time Video Transmission project

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

    Thank you sir..I got the idea from your video

  • @costynvd
    @costynvd 4 ปีที่แล้ว +2

    Very cool project! Thanks so much for the video, also explaining the amazing XY calculator. The droplets animation is very cool, hadn't seen that before. Assuming you are going to be using this in dark places, I would suggest turning down the brightness a lot. People do not like being blinded. Speaking from experience here. ;-) But you were going to add a diffuser anyways, so I think that will be allright. Might even consider using a slightly smokey material to dim it a bit (sometimes these WS2811's look ugly at low brightness).

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      I agree it needs some diffusion and toning down a bit! It does look quite different on camera than in real life however, I'm recording all this on a phone so I don't have much control over how it records. Thank you for your comment!

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

    I don't know if I'm too late to get an answer, but how did you make the other patterns? Maybe do a tutorial? That would be very kind :)

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      All the code is on GitHub if you want to take a look at it?

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

      @@ScottMarley Found it, thank you very much

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

    Hey, do you have tutorials on how to build masks? Is this 3D printed ? How did you attach everything to it ?

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

      I bought the mask from Amazon. I think everything else is shown in the video.

  • @maartena82
    @maartena82 4 ปีที่แล้ว

    Very nice mask. Can i ask how you switch between patterns ?

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      At the moment you change patterns by pressing the push button. Have a look at the GitHub page in the video description to see how everything is wired up.

    • @maartena82
      @maartena82 4 ปีที่แล้ว

      @@ScottMarley i gone have a look. And al the code you place on a diverent tab. And then you can push the button and switch the pattern ? Thank you for the information. I will try it. Its very nice

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      @@maartena82 all the code is also on GitHub. However, you will need some experience in wiring, coding, FastLED etc in order to get this to work. Good luck!

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

    So I'm using an Arduino Nano 33 IoT which does not have an EEPROM.h library. Do you know of any workaround?

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      I've never used it, but apparently this library is a good option github.com/cmaglie/FlashStorage

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

      @@ScottMarley ok thanks! Where would you recommend I copy paste this amongst your code? Really appreciate your help.

  • @ratchet601
    @ratchet601 4 ปีที่แล้ว

    How are you powering it? How much voltage does it need?

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      Everything runs from 5V. I run it from a USB power bank. The amount of current depends on the number of LEDs and the brightness setting. At 250 brightness, the most demanding patterns draw a bit over 2 amps.

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

    great work! how can I compile these animations without the button?

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

      Not sure what you're after? How do you want to change the patterns?

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

      @@ScottMarley I'm curious about this too. Is there a way for it to just cycle through the animations and change automatically every 30 seconds for example?

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

      @@DustinDalziel777 yeah, very easy to do. Just change bool autoChangeVisuals = false; to true. Done.

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

      Oh, and to change timing to 30s, change #define PATTERN_TIME 10 to 30

  • @mr.oliverNo0815
    @mr.oliverNo0815 2 ปีที่แล้ว

    Hi...What kind of wire do you use to connect?

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

      Not sure what you mean. To connect what? The Arduino nano uses a micro USB connector for power. The wires to the LEDs are just normal hookup wire (not sure what size). The wire used to connect the led strips to each other is tinned copper wire.

  • @lazywargaming6752
    @lazywargaming6752 4 ปีที่แล้ว

    I want to do this so that it reacts to sound. i have a microphone, nano and everything else. I just don't know how set it up. any chance you could show the wiring on the sound reacting one?

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      The wiring is shown on the github page linked in the description github.com/s-marley/LEDMask

    • @lazywargaming6752
      @lazywargaming6752 4 ปีที่แล้ว

      @@ScottMarley thank you so much for your help

  • @ice-iw5xr
    @ice-iw5xr ปีที่แล้ว

    this work for wled?

  • @etherealx3
    @etherealx3 8 หลายเดือนก่อน

    I hope your ok, i used to watch all your videos and havent seen u in a while!, i hope its everything ok :)

    • @ScottMarley
      @ScottMarley  8 หลายเดือนก่อน +1

      Thank you for checking! I'm good, I have a baby and a house to renovate now so just no time to do this any more unfortunately. Maybe I'll come back one day!

    • @etherealx3
      @etherealx3 8 หลายเดือนก่อน

      @@ScottMarley super good to hear from you! I truly understand, family comes first, I hope everything goes well :)

  • @LeonMOOK
    @LeonMOOK 4 ปีที่แล้ว

    This is the best thing

  • @slayerz_0019
    @slayerz_0019 4 ปีที่แล้ว

    How did you solder and connect all of them

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      With a lot of patience, some wire and a pair of tweezers! 5V is connected to the right side of every strip, GND is connected to the left side. Data starts at the top right and zig-zags it's way through every strip.

    • @slayerz_0019
      @slayerz_0019 4 ปีที่แล้ว

      Scott Marley oh alright thanks and if it’s not to much trouble how many parts did you use like how many resistors, LEDs, you know stuff like that. If u can thank you I’m doing a project and I would live to do a mask like yours.

  • @yusuf120581LED
    @yusuf120581LED 4 ปีที่แล้ว +1

    Coool

  • @aimiloo
    @aimiloo 4 ปีที่แล้ว

    I see a lot of really awesome LED masks, but I just want to buy them! Is this one for sale? Will you be making any for sale?

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      Sorry, this takes way too much work to make and it's pretty fragile to be selling I'm afraid! There's a big difference between making something as a hobby and working out how to get things manufactured, and it's a skill I don't have at the moment. I do appreciate you asking though!

    • @aimiloo
      @aimiloo 4 ปีที่แล้ว

      @@ScottMarley @Scott Marley Bummer. Well thank you for the prompt reply, I appreciate it! I just personally don't have the time or desire to build one, it looks very complicated to me. I'm not code savvy or an engineer of any sorts so I would just get frustrated building one. I hope that somebody will be able to build a really awesome one and I can buy it! I've found some online but they're just very generic, not that great of quality, or way too expensive.

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

    4:56 yeah but leds are in serie there is no blank spots

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      That's true, but we are telling the software that there are blank spots so the image display correctly.

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

    Awesome work, I loved it. Can u send or share me the entire code I like to try it. Thanks 😊

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

      It's all in the description at the github link

  • @lazywargaming6752
    @lazywargaming6752 4 ปีที่แล้ว

    JC_Button.h doesn't want to work for some reason.
    edit. nevermind. got it

  • @donvukovic
    @donvukovic 4 ปีที่แล้ว

    Did you purchase that actual black mask or make it your self ?

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      I bought it from here www.amazon.co.uk/Kasstino-Airsoft-Cosplay-Costume-Halloween/dp/B01IT8Z2R0 I'm not crafty enough to make it myself.

  • @joeledgar5879
    @joeledgar5879 4 ปีที่แล้ว

    Please make a video about porting to the esp32!

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      I may do that in future as having Bluetooth or WiFi control would be great! In the meantime, this code will work fine on the ESP32 as it is, just change the board in the boards menu and upload it.

    • @costynvd
      @costynvd 4 ปีที่แล้ว

      @@ScottMarley Check out the Blynk project. You can easily add wifi remote control. Although it requires internet, not so handy in a mobile installation.

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      @@costynvd I'd probably do it like the Bluetooth control on my ESP32 matrix. I don't generally have WiFi where this is useful (mainly festivals!). Or maybe local WiFi control although I haven't done that before. Always good to learn something new though.

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

    Please make led charki

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

    Great ending, hahaha! xD

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

      I videoed my friend wearing it out and about in Bristol th-cam.com/video/mhwCIkfVXH0/w-d-xo.html

  • @АндрейМухин-м2я
    @АндрейМухин-м2я 3 ปีที่แล้ว

    zombie apocalypse ))))

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

    bdsm has gone too far