09-Precision Draw - LED Strip Arduino Tutorial - FastLED Effects - on RGB LED WS2812B

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 70

  • @FunBideo
    @FunBideo 6 місяців тому

    Looks like I’m a few years late seeing this but I must say this method for smooth scrolling is pure genius!

  • @TheRealStructurer
    @TheRealStructurer Рік тому

    Just about to put some LED's under my glass surface desk, and this series will sure save me a ton of time! Thanks for sharing 👍🏼

  • @SisterIdaKnow20
    @SisterIdaKnow20 Рік тому

    12 Twelve days of following the video, almost frame by frame, to find that the video missed one line of code that messed me up.. "FastLED.clear();" was no where to be found, until I dug into github for this episode and did a line by line comparison. (WHEW) Now to try applying to comet or bouncing ball.. Your teaching style does match with my own CDO'ish ness (also called OCDish ness). I have been wanting to learn this and going through each video multiple times.. This one was the challenge that, now that it is accomplished, makes one feel like I am learning. 💝🌈🌻

  • @lavem
    @lavem 2 роки тому +9

    If you followed along like me and you wonder why the whole strip fills half red half green with no animation then you need to put:
    FastLED.clear();
    DrawMarqueeComparison();

  • @autodidact7127
    @autodidact7127 4 роки тому +7

    Thank you Dave!

  • @robertbauer6723
    @robertbauer6723 Рік тому

    Thanks Dave, this code and the ideas you shared about fractional drawing have been very helpful for my own project. In fact, it was your videos about individually addressable LEDs that got me interested in the first place. I'm using an Arduino Uno now, but plan to move on to ESP32 at some point.

  • @IamEqualtoall
    @IamEqualtoall 4 роки тому +4

    Thanks for the next step in you're altruistic training sequence!

  • @ca-mue
    @ca-mue 3 роки тому +1

    the first video i saw from you and directly subscribed. What a sympathic guy! :)

    • @scoopiezz
      @scoopiezz 6 місяців тому

      what a real sigma

  • @dvohwinkel
    @dvohwinkel 4 роки тому +5

    2 new episodes in less than 24 hours?! We are going to have tweak the name to "Dave's Fast and Furious FastLed tutorial" :) Not that I am in any way complaining! :)

  • @deeeee487
    @deeeee487 2 роки тому

    thanks Dave!
    I got precision "sub pixel" working sorta in some fixed point 24.8 format on a diff micro. very very cool.
    Once you saw how easy it is, that it is only a matter of breaking the "width" into portions or chopping on pixel boundrys it was easy! TY

  • @reykoschachtschneider4645
    @reykoschachtschneider4645 3 роки тому +3

    Very nice effect! Only, it took me some time to figure out I need to add a FastLED.clear() befor drawing the MarqueeComparison. I either missed that in the video or you didn't say. I'm not sure. But when it worked it looked impressive!

  • @costynvd
    @costynvd 4 роки тому +2

    Amazing, good stuff! Definitely gonna use this in my projects.

  • @cbrsilv15
    @cbrsilv15 4 роки тому +2

    I don’t know anything about coding, but you make it look much easier than it is! Great videos!!

  • @RNMSC
    @RNMSC 2 роки тому

    Knowing that the actual 3 LEDs in a pixel in these strips are not arranged one next to another, but in a circle with one color covering the entire width, and the other two covering about half the width each, you could use a variation of what Steve Wozniak developed for the Mac, where the color pixel that directly adjoins the fully illuminated pixel gets illuminated a bit more than the others, the color that remains gets no illumination until the fractional line starts covering it as well. I'm not sure of the arrangement, but suspect it's something like Green across the entire width, Red across half, and blue across the other half. In this case the Green led is adjusted as you are doing, and the red, or blue leds are adjusted as the old technique would.
    I realize there are differences here as well, considering that the spacing between the pixels in the strip will probably have even more of an impact, as neither the pixels on either a CRT, or LCD screen have the gap between them that all but the tightest light strips do. But it would be interesting to see if it could be applied smoothly, and whether it would look better or worse.
    Thank you.

  • @jaredg4503
    @jaredg4503 2 роки тому +1

    Love the videos, any chance of a video on the fireworks or drifting twinkle effects? Great work and explanations.

  • @MadMatty72
    @MadMatty72 3 роки тому

    The first thing ill try, thanks David.

  • @mikus4242
    @mikus4242 4 роки тому

    Thanks, great break from teaching 1st semester programming.

    • @DavesGarage
      @DavesGarage  4 роки тому +1

      You are welcome!

    • @ishdemon_
      @ishdemon_ 3 роки тому

      @@DavesGarage Wont the SinBeat function will do this same smooth effect? or this is better than that??

  • @danielheskett
    @danielheskett 3 роки тому +2

    Hey Dave, first, thanks for all this great content!
    As to if there’s a faster way to do this, let me begin by saying that I’m only a hobby programmer in C.
    I was thinking that what if you just sized an array of color pixels that was, say 100 times bigger than the number of LEDs you had and then averaged them out before sending to the strip?
    I’d be willing to write this and maybe even do a “drag race” but I don’t want to waste my time if you can immediately tell me that it would be less efficient.
    I bow to your superior experience, sir!

    • @robertbauer6723
      @robertbauer6723 Рік тому

      Daniel, did you ever try this? Curious about the efficiency. I think one concern would be memory use on smaller uC's like the Arduino Uno. ESP32 not so much.

    • @criptych
      @criptych Рік тому

      Performance-wise you'd probably be better off with a power-of-two multiplier, like 128 or 64, so that the final division becomes a bit shift. Even 32 or 16 would probably give decent results (and save memory). Keep in mind too that extra "subpixel" values means not just more memory, but also more calculations on each update.

  • @smartups1
    @smartups1 Рік тому

    What an awesome man .

  • @freedomforall1602
    @freedomforall1602 2 роки тому

    Thank you for the great content

  • @muzaffar.ahmadi
    @muzaffar.ahmadi 4 роки тому +1

    Thank you Dave...I really love your videos...great information...could you please make one video how to setup ESP 32 and visual code on mac...can’t get it working on mac...it works on windows...thanks

  • @alanesq1
    @alanesq1 3 роки тому

    Brilliant!

  • @ezrakoper
    @ezrakoper 5 місяців тому

    Dave thanks for the video.
    Question- is this typing crazy crazy crazy speed is you real typing speed or you speed it up to save video time?

  • @brandondelgado4153
    @brandondelgado4153 3 роки тому

    FastLED has a similar function called blur1d. I dont totally understand the code behind it, so a comparison would be cool.

  • @Goto10Gaming
    @Goto10Gaming 3 роки тому

    Just found ya and LOVE your content, Dave, thank you

  • @DasAttorney
    @DasAttorney 3 роки тому

    This is great -thanks for sharing

    • @scoopiezz
      @scoopiezz 6 місяців тому

      honestly, float availFirstPixel = 1.0f - (fPos - (long)(fPos));
      float amtFirstPixel = min(availFirstPixel, count);

  • @kurtwerbrouck5439
    @kurtwerbrouck5439 2 роки тому

    Hello Dave
    I remeber that in one of your scripts/programs you used an array of function . Like that you could scroll in to the array and run all the functions . I cant find it back where is was. Have you an example? Nice videos

  • @Fogaata
    @Fogaata 3 роки тому +1

    Do I need to smoke something to understand this? 😊 great video!!! Subscribed.

  • @OldePhart
    @OldePhart 3 роки тому +1

    You state to click "personal" recommendations *and* the bell icon. Those choices are mutually exclusive. If I get the UA-cam explanation right, the personal option lets them add video notifications they think you want while the ALL option is everything from you. Do you understand that differently ? I don't want to miss any of yours, but having UA-cam add more that it thinks I want is often not a good option. I have a lot of interests and their math doesn't always add up. .

  • @vair3273
    @vair3273 4 роки тому +4

    Dave thanks for all the work...awesome stuff. I do have an issue with this episode's code. I get solid green on the right, solid red on the left with one single yellow but not in the middle (more green then red). Thought it was my typing but nope copied the code from GitHub. I still get the same result. Any thoughts?

    • @Kagesh53150
      @Kagesh53150 4 роки тому

      I am also getting these results with both my typed code and the GitHub code. I have changed out the LEDs and also changed the GPIO pin with the same result. Could really use some help! I want to add that all of the other effects we've coded are working fine. Thanks, Mark

    • @DavesGarage
      @DavesGarage  4 роки тому

      Which function is this in, DrawMarqueeComparison()? I'll test out from github an let you know, it's quite possible I checked in a bug at the last second!

    • @DavesGarage
      @DavesGarage  4 роки тому

      Let me check! Is this DrawMarqueeComparison?

    • @vair3273
      @vair3273 4 роки тому

      Yes

    • @Kagesh53150
      @Kagesh53150 4 роки тому

      @@DavesGarage Not sure it's in DrawMarqueeComparison(). For testing, I upped the delay at the end of loop() to 1 sec and you can see the pixels building in color but they never reduce in color as the marquee moves. This is the case for the smooth green marquee as well as the red marquee. I think it could be in DrawPixels() where the first pixel is not being dimmed.

  • @usmcmckee
    @usmcmckee 4 роки тому +2

    Hey Dave, When can we expect your GitHub repo updated?

  • @marcelleprinsloo2436
    @marcelleprinsloo2436 4 роки тому

    Loving the videos. Inspired me to now redo my whole Lightsaber OS. One question though, when can we expect the flame effect?

    • @DavesGarage
      @DavesGarage  4 роки тому +4

      Working on it right now, it's the next episode I expect!

  • @GeorgeC1andonly
    @GeorgeC1andonly Рік тому +1

    Come up on my first hiccup in the code so far - at least I cannot understand why this error is being thrown at me - now I've added these functions and tried to implement them - the interpreter is claiming I cannot 'convert 'CRBG' to float when I used DrawPixels(i, 3, CRGB::Black); or indeed DrawPixels(i, 3, CRGB::Yellow); or anything - it just doesn't want to take the CRGB input - but I've gone over the functions and it doesn't make any sense to me - any ideas where to start looking in to this?

    • @GeorgeC1andonly
      @GeorgeC1andonly Рік тому

      nvm - I figured it out - I think, I was using a for loop with integers not a float - which the function has to receive.

  • @neilw2O
    @neilw2O 3 роки тому

    Hi Dave. Been watching your MS live stream stuff, delayed, with great interest.
    Now you being an arduino IDE user and MS/Windows expert, Is it possible to make the F3 key translate to ctrl-g for find next? I have really tried hard to do this, and now realize your java comments convince me I hate (cpu hungry) java too. Or do I just give up and use an external editor, like notepad++?
    Thanks. Neil

  • @Flavourdynamics
    @Flavourdynamics 4 роки тому

    Thanks for the video. I'd love to make this work in two dimensions. Any top-level ideas on what edge cases this might introduce?

  • @andymouse
    @andymouse 2 роки тому

    Subbed and liked !.....cheers.

    • @scoopiezz
      @scoopiezz 6 місяців тому

      *liked! Cheers.

  • @jamesmcpatterson2733
    @jamesmcpatterson2733 4 роки тому

    Thanx.

  • @youmearea
    @youmearea 3 роки тому

    Hey Dave,
    I would like to implement DrawPixels in my code but the problem is, Im using lerp8by8 which returns a uint8_t value for the index of my led strip each iteration. Do you have any ideas so I can implement the DrawPixel function while using lerp8by8?
    The reason I'm using lerp8by8 is that I have four led strips of different lengths that I want to light up from beginning to end at the same time.

  • @DJGeosmin
    @DJGeosmin 2 роки тому

    you REALLY need to pick up a MA3

  • @jasonpape8775
    @jasonpape8775 Рік тому

    Hey Dave can you help me out with that flame effect comet?

  • @IlIDINOIlI
    @IlIDINOIlI 3 роки тому

    Hi. Could u explain us how to make 2 strips with 2 different lengths work parallel the same effect ? I can't understand what i find in internet
    Thanks in advance

  • @SpikyHegdehog
    @SpikyHegdehog 3 роки тому

    Would these effects work with an arduino uno?

    • @DavesGarage
      @DavesGarage  3 роки тому +1

      Many would work, yes! The ESP32 is much more powerful but the Arduino can do a surprising lot!

    • @SpikyHegdehog
      @SpikyHegdehog 3 роки тому

      @@DavesGarage ok cool! how would I upload the code to the arduino?

    • @ericlanglaismm
      @ericlanglaismm 3 роки тому +1

      @@SpikyHegdehog you can use the arduino ide or if you want you can use vs code with the platformio extension then you can create a arduino project from platformio home page.

  • @JonStaples-c6q
    @JonStaples-c6q 5 місяців тому

    If anybody has actually figured out how to add this to the bouncing ball effect, please let me know.