FastLED Basics Episode 3 - Palettes

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

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

  • @theDNG1369
    @theDNG1369 4 года назад +12

    The best FastLed Tutorial EVER! Continue please!

  • @deepakkanade5041
    @deepakkanade5041 4 года назад +3

    Most amazing effects on the LEDs. I am a 56 years (young) beginner in the world of Arduino and individually programmable LEDs. Your videos are like learning A, B, C, D.... covering the most basics and fundamentals... Thank you so much. Great help for people like me..

  • @hexopod
    @hexopod 4 года назад +16

    Scott THANK YOU for these. I've been watching them all today without physically practicing, but I'll be going through them all again hands-on. You're doing an incredible job of introducing new basics and then adding relatively simple but extremely practical complications on top. Exactly what I was looking for.

  • @mr.zsmathematics8026
    @mr.zsmathematics8026 Год назад

    Scott, You talk a little fast, but, after I paused the video over and over , I think I might understand it a little better. I taught this to high schoolers and they loved it! The MORE comments in your code the better for dummies like me. Thanks for your efforts.

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

    Excellent across the board; communication skills, video quality, organization, level of detail and explanation, technical accuracy all come together nicely here. Hope you keep making videos.

  • @paulvorderegger1522
    @paulvorderegger1522 3 года назад +1

    Amazing! Very simple explananation without much fuzz. Saying this as a programmer (not with C++ or FastLED but this is the first video about FastLED I watched and I think I got it pretty well now...)

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

    Thanks Scott. This video "FastLED Basics Episode 3 - Palettes" is fantastic. Palettes are obviously the key to making LEDs dance and your instructions make the abstract concept very understandable.
    The entire "FastLED Basics" series is must watch TV for anyone that wants to understand how to program LEDs. Thanks again.

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

    You have no idea how helpful this is man. I’ve been looking for something like this for so long. I’m watching all of them. Thanks to you im going to have the coolest room in my apartment complex.

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

      No worries, glad they're helpful!

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

    Awesome job so far. Really easy to follow and makes FastLED accessible to a whole new group of people. Please keep it going!

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

      Thank you, I'll try my best.

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

    Hands down the best FastLED tutorial out there. Thank you.

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

    Wow, what a series. This one slowed me down a bit but I'm learning a lot. Thanks for your commitment and focus in this matter.

    • @ScottMarley
      @ScottMarley  3 года назад +1

      Thank you, glad it helped

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

      @@ScottMarley Can you tell me how you plotted the Serial print data? Rather than just numbers? I can see this would be a good tool in the toolbox. Thanks

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

      @@donaldmartin2640 there is a good tutorial for the serial plotter here if that's what you're referring to? arduinogetstarted.com/tutorials/arduino-serial-plotter

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

      @@ScottMarley Thanks so much.

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

      @@ScottMarley Sorry, it is in the Tools table. Feeling a little dumb. LOL Thanks

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

    Super useful, all the tricks and code sources are really appreciated. Thank you

  • @tin_foil_hat99
    @tin_foil_hat99 2 года назад +2

    Thank you so much! These helped me out so much in my projects. This is the most helpful series i've ever found, you deserve all the thanks in the world (:

  • @scienceoftheuniverse9155
    @scienceoftheuniverse9155 4 года назад +2

    Thank you so much Scott. This is a great and comprehensive fastled tutorial I have ever seen.

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

    This video is awesome! I've been using FastLED for YEARS and I've always been apprehensive for the dive into palettes.. but you've done a fantastic job of explaining it! Thank you!

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

    Another great addition to your Playlist. Ill be referencing your videos for a long time to come. Thanks for the time stamps too. That will definitely help in the future viewings!

  • @3D-Amir
    @3D-Amir 4 года назад +2

    Thanx for all your efforts Scott. Can't wait to watch your next tutorial for FastLED :)

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

    Just decided to apply leds and fastled to my project and this video is amazing, thank you for explaining every bit and how it works, now i can do what i had in mind, you showed the way!

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

    Very nicely explained, never knew we could make our own palettes. Though you needed to be an expert at this.

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

    loving this so far! You've helped me understand some of the FastLED stuff lately! Perfect timing too! I can't wait to update my ESP32 project

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

    Thanks for this series, its perfectly paced and great references. Please continue producing them, i and im sure all that are watching are learning so much.

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

    YOU MADE THE BEST TUTORIALS FOR FASTLEDS

  • @DWR6
    @DWR6 3 года назад +1

    I've learned so much from your videos! Please keep them coming. I just subscribed! ✅

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

    That's one of the best tutorial i've seen for FASTLED and palettes, i'm gonna use that for my next project, thank you a lot! :D

  • @benjaminpmartin
    @benjaminpmartin 4 года назад +2

    Thank you SO much for your erudite and lucid instruction on this subject.

  • @logancoats
    @logancoats 3 года назад +1

    With 300 LEDs in my array the fill_palette fills all with a solid color, is there something else that needs to be done when using more lights? Your videos are amazing!!!!!

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

    this videos are so helpful and got me to understand fast led a lot faster than I thought thanks you scott

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

    Hi Scott, just wanted to say thanks for this GREAT tutorial. I'm very new to FastLED (and Arduino in general) and you're speeding me along the learning curve. Your demo on palettes was a huge missing link for me.

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

      Thank you, in really glad it helped!

  • @matthiash.454
    @matthiash.454 4 года назад +2

    It goes straight on so simply class

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

    Great videos! Thank you for taking the time to do all of this! Helped me learn fastLED so very well

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

      Thabk you! Putting these together helped me understand it too :)

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

    I have zero knowledge about programming but you do an awesome job explaining erverything! Thank you so much for all of this!

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

    Amazing tutorial
    Very nice and smooth

  • @schlotdoglaser
    @schlotdoglaser 3 года назад +1

    Can't wait to apply some of these pallets to my GEMMA MO.

  • @cdurch1
    @cdurch1 4 года назад +2

    Couldn't get code at 5:01 to work, had to change your parentheses () framing the palette to curly brackets { } or whatever these things are called. Then had to change "myPal" to "purplePalette" down in the fill_palette line. With these two changes the code worked fine. Very beautiful, in fact!

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

      Thanks for the heads up, I'll check that and correct if if necessary. Glad you figured it out anyhow!

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

      Thanks Bro, I almost gave up on that one lol

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

      Thanks for pointing this out!

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

    very cool tutorial, thanks for the effort creating it!

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

    Great video. Palette Knife does work on the Opera browser.

  • @ScottKraft
    @ScottKraft Год назад +1

    Palette blending is neat but is there a simple way to fade or blend from one fill color to another (where the whole strip smoothly moves between specific solid colors)?

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

    thank you so much !! you made it so easy to understand the palettes and now im hooked!

  • @joeb.fromsydneyaustralia5313
    @joeb.fromsydneyaustralia5313 2 года назад

    Great video - are you able to explain what the code from Line 72 to 75 does and how it works. Thanks.

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

    Hi Scott, Great videos! Thank you for making them. I was wondering if there is a way to run a palette on only the even or odd numbers of leds?

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

    This is super helpful, definitely going to use this in my next project!

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

    Another great lesson. Thanks Scott.

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

    I really enjoy these videos on FastLED. Thanks for putting them together. Could you please explain what the difference between NOBLEND and LINEARBLEND is in some of the Palette functions? Thanks

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

      Say we have red, yellow, green, blue in a palette. I think Noblend should display a block of red LEDs, a block of green LEDs etc. Linearblend will gradually blend between the colours, so red blends into yellow, into green etc. However, when I've played with this, it doesn't seem to work. Not sure if I have the wrong idea though!

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

      @@ScottMarley Thanks for your reply. Makes sense.
      LINEARBLEND confused me, because if the 1st and last color in the palette are not the same, calling up index 240-255, the color starts to blend back to the 0 index position. I did not expect that.
      Anyway, thanks again for the great videos. I'm learning a lot!

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

    I am really curious about how these leds work . Like with just voltage input how can we controll leds connected in series separately. Please let me know

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

    Hi Scott!! Thank you very much for these videos!!
    I have a question, is there any way we can implement the patterns not starting from the first LED?? It is very important for the project I'm making :)

  • @GrooveYouVerse
    @GrooveYouVerse Год назад +1

    So when doing the color palette at the beginning, I set the NUM_LEDS to 20, but it seems to go past that point and statically illuminate the LED's in the gradient, but they don't move. Expected behavior?

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

      QUESTION 2: If I'm undersatnding fadeToBlackBy, it's automatically fading ALL lit pixels to black at once at that time, but the loop goes back and reruns the EVERN_N_MILLISECOND and a new LED is lit with a random palette color. Thus going back to the fade function and it will attempt to fade that pixel to black.
      I was confused because the function you specify the "leds" and the "NUM_LEDS," and I was expecting some kind of loop function to specify the specific led that just got lit from the above EVERN_N statement.

  • @MahBor
    @MahBor 6 месяцев назад

    I have 300 LEDs and the "255 / NUM_LEDS" in the "fill_palette()" doesn't work properly. It changes the color of the whole strip at the same time.
    I noticed that if the value of the argument goes under 1 that tends to happen. "255 / NUM_LEDS" is about 0.85.
    How do i fix this?

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

    Thank you, learned new things today!

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

    So im using the palette code but with 300 leds and once it gets to around 45 or more it starts to flicker or kind of stutter any soultion for this? Thanks

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

    Palette move from first pixel to last pixel.
    How to reverse direction sir?
    Thank you

  • @sicmunduscreatusest2674
    @sicmunduscreatusest2674 3 года назад +1

    Great Job Bro!!!!!! :)

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

    Can you help - wanting to use a button to move between palettes, where should the commands go?

    • @alheeley
      @alheeley 3 года назад +1

      n/mind - sorted it :) Thx for these excellent videos!

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

    And I continue to learn how much I can reduce the code I write and how quickly I can get results compared to the brute force coding method I've been going with over the last 4 or 5 years.

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

    When I try to use fadeToBlackBy, I notice the whites will faint to red before fizzling out. Is this because of my LED strip quality or is it because of some misconfiguration?

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

      That sounds like it might be a voltage issue on the LEDs (or crappy LEDs!). Check with a multimeter at various points along the strip that your LEDs are all getting around 5V. If not, you might have a power issue.

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

    Does anyone know if you can use a potentiometer to change gradually between two palettes on one strip?

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

      You could, but you'd have to do it a different way to what I've done here. The trick is to use the blend function. There is an example here of using blend to mix two palettes together using a beat, which isn't what you want to do, but might give you a starting point. gist.github.com/kriegsman/581b90df86b444934729

  • @5VoltChannel
    @5VoltChannel 4 года назад +1

    Yes 👍👍

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

    How would you use a 16 color palette to change the entire strip from one color to another, instead of scrolling across the strip?

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

      It depends on exacatly the effect you are going for. If you wanted it to smoothly change the whole strip from one color to another through the palette, create your palette as usual (let's call is myPal) outside your loop. Also outside your loop:
      uint8_t index = 0;
      Then:
      loop {
      EVERY_N_MILLISECONDS(30){
      index++
      }
      fill_solid(leds, NUM_LEDS, colorFromPalette(myPal, index));
      FastLED.show();
      }
      Or something like that. It very much depends on what you're going for. Make sure the last color in your palette is the same as the first color so when index jumps from 255 back to 0 the color doesn't jump also.

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

    Hello Scott , I really like the LED Palettes effects, I want these effects to flash according to the line in aux music. Can you share with me? Thank you very much. I'm not an expert in arduino programming so I don't know. edit code. Thanks

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

    Hey Scott, amazing videos, one of the best on RUclips..one question..i use 60 leds and externsl power supply (20watt) So its more then enough for arduino and leds..but when I disconenct USB from my computer, animstions(for exaple rainbow) it just freeze. Why that happens? Now that I programed lights and I Like it, i would Like to put them and arduino on then wall..so I need to disconenct arduino from computer..but when I do that, the leda just stop right as they were when i pulled USB out from computer..how to continue using automated patterns created for leds without computer? Thank you once again..its amazing what you do.. :)

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

      Make sure your external power supply is connected to the 5V pin (not Vin) and ground pins on the Arduino, as well as to the strip. Other than a power issue, there is no reason that it should stop when you disconnect the usb.

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

      @@ScottMarley yes, im doing just that, but it freezes when I unplug it..otherwise again, amazing videos..recomending then to frends that have intereset in those stuff..really amazing, keep up with good work..

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

      @@dokortiz1430 Thank you, that's very kind! When the lights freeze, that means the Arduino is no longer talking to them. Have you used a multimeter to check that there is 5V going to the Arduino? I can't see any other reason why it would do that other than a power issue. What happens if you don't connect usb at all, and only connect the power supply?

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

      @@ScottMarley then nothing happens, only power supply buzzing..and when I connect USB to arduino buzzing stops, and everything Works Like its supposed to..I used your schematics..

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

      @@dokortiz1430 have you measured if the Arduino is getting 5v from the power supply? It shouldn't be buzzing at all, and if it is, it's odd that it stops when connected to the usb. It sounds like a very poor (possibly broken) power supply. Do you have a different power supply to test with? Try it with a phone charger (1A is fine for testing, 2A if you have it) if you have a way to connect it to your LEDs.

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

    Do you use a stereo microphone? It is a little bit weird wearing headphones. Sometimes you breath just on left side and somethimes only on right xP

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

      That's odd, I'm pretty sure its recording in mono! On audacity there is only one track, usually it displays both if it's stereo. Sorry about that!

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

      @@ScottMarley Maybe a compressor or gate that is in stereo mode? there is definitely a difference between the channels. But I got used to it until episode 5 now :D

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

    Love this video! Is it possible to use paletteknife with a toggle switch? I have been trying to integrate it in another sketch that uses colorpalettes, but it just won't work.

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

      Paletteknife just gives you a way of downloading predefined palettes. Once you have your palette defined, you can use it like any other palette. It is of course possible to switch between a palette using a toggle switch. In pseudo-code: if(digitalRead(toggle_pin)) { fill_palette(blah blah)}; else {fill_palette(blah, blah)}. Which part isn't working?

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

      @@ScottMarley Ahh I figured out what went wrong. It said 'Sunset_Real_gp' was not declared because I included CRGBPalette16 myPal = Sunset_Real_gp; in the code that already had CRGBPalette16 currentPalette;
      I was trying to integrate it into Amelia Tetterton's Fastled PaletteButton sketch (codebender.cc/sketch:433123#FastLED%20Palette%20Button.ino) and her void loop was a little less intuitive to me than the one you suggested, but nonetheless it works :)
      For anyone interested I pasted the code here: pastebin.com/4RnVGi1j
      The Paletteknife case is the 3rd one.
      Thanks so much @Scott Marley!

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

    Hi Scott- thanks again, i have got most of you projects running. Two questions: is it possible to get one programming running, then another etc, i.e how do you stitch code sequences together. More importantly are there any books or on line tutorials to learn this code format cheers Adrian .

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

      Yep! See episode 5 ruclips.net/video/fRXJQVdwrog/видео.html

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

    Thanks for the informative video. Is it possible to create pallets on the fly?

    • @ScottMarley
      @ScottMarley  4 года назад +2

      Yes, absolutely! You could do something like:
      CRGBPalette16 myPalette;
      myPalette[0] = CRGB(255,255,0);
      ...
      myPalette[15] = CRGB(169,234,89);
      Or whatever :) you could go through from 0-15 in a for loop changing each RGB value slowly if you wanted to, use predefined colours or use HSV (although you'd have to convert to RGB I think before you add them to the palette).

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

    hi bud you have a new sub l have been looking for this for a very long time so thanks for the vids

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

      Thank you, I hope they help a lot of people get started. LEDs are fun to play with!

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

    Very nice. But. I would like to be able to start at LED number 18 and go to LED number 66 on a strip of 179 Leds. How would I code that??

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

      It depends on exactly what you want to do, but just address this in your for loop: for (int i = 18; i < 67; i++) { do stuff with LEDs}

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

      @@ScottMarley I will give that a try.
      Thank You

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

    Thanks a lot nobody's explain fast led this way grate information...

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

    Hi
    I Used the gradient palette(CSS gradient) but its input color and output color(LED strip) irrelevand.
    What would be the problem

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

      I would have to see your code. Can you copy it to pastebin and put a link here please?

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

      I don't have access to any of those files (they are not shared with me) copy your code and paste it to pastebin.com/ then link it here.

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

      You need to follow my instructions. I'm not looking at your code on a video. If you can't do what I'm asking you here, you won't be able to fix your code. I'm very busy and don't have time to mess about like this.

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

      @@ScottMarley pastebin.com/piHDSCpW

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

    Is there a way to use the HEX values?

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

      Yes for example: leds[i] = 0xFF007F;

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

    how can i add adafruits Pac-Man to my led pallet selections from fastled?? also im not sure if im asking this correctly.

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

      ruclips.net/video/64X5sJJ4YKM/видео.html

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

      Hi Francis, I'm not sure what you're asking me! I don't know what Adafruit's PacMan is or why you posted a video of a flame effect lamp. What are you trying to do?

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

      @@ScottMarley Im very new to all of this to include programing. i added the flam lamp so you can look at coding on github hopefully. and id like to add the pacman led and try to merge the two.

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

      ruclips.net/video/uA1B6-CTotE/видео.html

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

      also id like to apologize if thisnt a worthy question or even allowed here on your page. I do enjoy your videos very much

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

    Hey Scott!! Just wanted to suggest a slight improvement to your code. You actually don't need to use "NUM_LEDS - 1" in the call to random8() because the definition of random8() is such that:
    random8( n, m) == random from N..(M-1)
    github.com/FastLED/FastLED/wiki/High-performance-math#random
    Not trying to be a jerk here! Just trying to add something useful. As I said in a previous comment your videos are an absolute asset to the FastLED community and I very much appreciate what you are doing!

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

    One thing I have yet to see explained is how to run or start a Sketch,.

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

      Hi Martin, I'm not quite sure what you mean? Do you mean how to run anything at all on the Arduino? If so, there are plenty of videos out there on how to upload your first sketch to the board. FastLED is not a good starting point if you've never run an Arduino sketch before - get comfortable with that then come back and have fun with this stuff!

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

    Dude u rock

  • @99rkrouse
    @99rkrouse 9 месяцев назад

    Do you have a book?