05-Marquee Effect: Arduino Tutorial - FastLED RGB LED Effects - Plus Rainbow LED Effect

Поділитися
Вставка
  • Опубліковано 16 вер 2024
  • Learn Arduino step by step with this FastLED LED Strip effect tutorial for beginners on up. Watch live on the LEDs as Dave works in the editor and debugger, showing you how to craft your own LED strip effects for ARGB (individually addressable RGB) LEDs.
    The Heltec ESP32 module used in the video is available at the following link:
    www.amazon.com...
    Software Prerequisites: Install the following!
    (1) Install the Arduino DESKTOP IDE (not the Web Editor) from www.arduino.cc...
    Even though we will not be actively using their IDE, the Arduino software must be installed on the machine even though we'll be using VS Code. Thus, we install the desktop IDE and then never use it. You may wish to launch it and install the ESP32 platform to make it useful for quick scratch projects, etc.
    (2) Install Visual Studio Code from
    code.visualstu...
    Visual Studio Code will be our editor and IDE.
    (3) Install the PlatformIO IDE
    platformio.org...
    PlatformIO IDE is an "environment" for VSCode that includes the compilers, tools, and everything you need to compile, build, and run projects for many systems. The Arduino ESP32 is but one of those, so we must install the ESP32 platform within PlatformIO:
    (4) Within PlatformIO/VSCode, install the Espressif ESP32 Platform for Arduino
    With those four, you should be able to go to the PlatformIO home page in VSCode and click on "New Project". Enter a project name, select "ESP32 Dev Module" as the board, and Arduino as the framework. You should be greeted with a working, building, deployable project consisting of a single file, main.cpp

КОМЕНТАРІ • 56

  • @jenskapmeyer2579
    @jenskapmeyer2579 3 роки тому +5

    To see an absolute professional showing us fun programming stuff in such a nice way makes me smile everytime i see a new episode.

  • @ryusaikou1604
    @ryusaikou1604 4 роки тому +6

    Yay, back to LED stuff, I bought two sets and did a radioactive glow effect for my sons bed, he loves it. Can't wait to learn a few new tricks!

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

    My wages are now being spent on "Home Improvements" with RGB led's and ESP 32's. I have a couple of Projects that I have in mind. For now I will be creating a basic binary clock that tells the time, date and temperature out in the garden. These videos are of help. and I revisit quite often.

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

    Yea!! Very excited you are back to FastLED. Just in time for Halloween and Christmas!

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

    This is what I was waiting for so long. Thanks for this tutorial, can't wait to see the next episodes!

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

      Me too!. Content is still good but this is the one I was wanting.
      The other one, is controlling it via a remote app.

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

    Just found this series, very useful. My intention for buying LED strips was to put up permanent Xmas lights that I can use for any holiday. But then I found a 16x16 chain able panel and I figured I could cover the windows with them and make some kind of fireplace or fireworks display. We'll surprise surprise surprise. The panel is just a strip wired up different. But, the brilliant person who wired up these guys didn't think to organized them like a matrixm no no no. Rather than [1][15] being next to [0][15] , it's next to [0][0]. So the convert an (X,Y) to [i][j] I need a logical to physical function where if the MOD of i=X is 1, Y is 15-j else Y=j. Not a big deal, I used to have to write these sorts of l2p and p2l functions all the time when I was a kid to convert computer top-left coordinates into cartesian or polar systems all the time. Now if I can only find my olde homework tapes from my Atari 800, then I won't have to rewrite all those functions. It's going to be fun porting the old fireworks demo from Atari BASIC to C on a 16x16 display. Maybe I'll get a few more panels and make a proper 640x480 display. Oo that's going to be some ugly translations. I wonder if there is a GIF library for Arduino... so many tangents to explore. Game of Life! Plasma! Wifi controls. Web interface. This is going to take a while.

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

    Excellent video! I like the way you split the screen in your video mix. Please keep up the great work Dave!

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

    I'm loving this series! I got my ESP32 a few days ago, and the LED strip should be delivered in 2 days. Then (with your ongoing series), I should have enough to be able to play. Thanks!

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

    Instead of Copy and paste he teaches you how to do it. Cheers Dave!

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

    Love your channel Dave, I'm learning a lot and enjoying your videos at the same time. Pretty impressive as its usually only one or the other!

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

    Hi Dave, thanks for your great work, can't find such a detailed vid about fastled lib. Only started using arduinos and ESP32 for 1 month so I have loads to learn but thanks to you I ve made an extra step. Thanks a lot. Now I need to figure out how to make my animation react to audio input. Great job thx again !

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

      Noted! The module I want to actually use for the mirror has a microphone so will try to incorporate it!

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

      @@DavesGarage Yeah, seen quite a few led mirrors on youtube, no one had the genius idea to use WS2512B instead of basic ledstrips, I was thinking of making one because I wondered what effect the WS2512B would make with such a mirror, I was guessing that it would make a true vortex looking through it, and then I checked out your video. Dave you're a very clever man indeed. Love how it looks .... Mindblowing.

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

    Commenting halfway through the video again, Im digging this series, I followed along using ArduinoIDE, an LCD display(having to update that a little less often), and an UNO, I had to add a non zero denominator to the FPS calc because it was so fast to go from line dStart to dEnd, I been watching MIT computer science, you and using chatGPT to help me understand the code. Thanks

  • @gonzo95682
    @gonzo95682 10 місяців тому

    Thanks Dave. Your tutorials are amazing.

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

    Nice, printf() brings back memories of writing C code for Lockheed at the Johnson Space Center.

  • @pippifpv
    @pippifpv 4 роки тому +9

    Still waiting for the "fire effect".
    Your videos are very appreciated.
    I like that piece of art fire pit in the background. Can you show how it is made?

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

      Coming soon! A couple of more effects before we get to fire, as it's more complicated, but its coming up!

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

    Mr Dave Thank you for sharing this value video.

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

    Hi Dave,
    I incorporated your patterns into a program that periodically cycles between a bunch of different patterns. It ran fine initially but always froze/crashed after several hours. After some troubleshooting, I found that it always crashed inside the DrawMarquee function. After a bit more troubleshooting, I found the culprit... the scroll variable should be defined as an unsigned int. As coded, the scroll value rolls from +32767 to -32768, which wreaks havoc in the loop. Changing the value to unsigned fixes the issue.
    BTW, while writing this comment, I discovered that int may be either a 16-bit or 32-bit value depending on the HW. I'm running my program on an Arduino Nano Every, which uses a 16-bit int value. On a 32-bit processor (like the one you're using), I believe it uses a 32-bit value which gives a range of +2^31-1 to -2^31. I think that may explain why you never ran into the bug. It takes a LONG time to roll over.
    That said... thanks for your videos. I'm an electrical engineer (ASIC/HW guy), but a complete Arduino newbie. I'm learning a lot about C++ programming here. (BTW, do you really type that quickly?!? It almost seems sped up. :) )

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

    I already can the basic of develop in C#, C++ but find it anyhow entertainment to watch this and could imaging my 6 year old daughter maybe would found this some what useful to learn to programming. Sure I have more in depths videos for learning C# but it's more for people that really want to understanding C# and not be enough with what Arduino lib could do by it self.

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

    I have much to learn!!! Thank you for your videos!!!

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

    Thank you so much for taking the time to explain all of this, question what did you click on to add the header block at the top of the cpp file?

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

    Dave, I am hoping that you will actually see this and hopefully respond. However, I have just finished your tutorials up to this point and I have not gotten any issues that I couldn't figure out how to handle myself........................ until the end of this video. I will continue to attempt to figure this out but I was wondering how I could talk to you about this very specific issue? On another note your videos are fantastic and very informative and is helping me to understand this area of coding. Continue doing a great job on these videos.

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

    Awesome, much appreciated!

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

    Speaking of kinematics. You should get a STEM robot arm ( I got the one from sainsmart) and do an inverse kinematics series.

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

    I love your channel even though I couldnt get my LED strips to light up. I think it has something to do with the digital signal output being 3.3V and the WS2812 strip needing 5v?

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

    great stuff. thanks.

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

    Looking for a bit of help please, got the project running, rainbow lights, unplugged everything, reconnected no LED lights now, can change the program, upload to the board, get the onboard LED blinking and the FPS updating on the screen but no rainbow LED lights! TIA

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

    Hey Dave, love the videos. Do you have your code somewhere that can be downloaded?

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

    Oh hell yeah

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

    Hello Dave, I'm currently working on a Marquee sign project for my home theatre. I have all supplies to create the marquee sign but having troubles with the coding for the chasing lights. I'm hoping to have at least 2 to 3 yellow lights to one black travelling around the sign. Would you be able to help? Meantime, I'm going to continue to play around with the coding myself.

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

    Hi Davepl
    How do you get the scrolling effect at 9.00 with no for loop to scroll the leds apart from the black scrolling at 13.08. I've also downloaded the series master file for the tutorials. Thanks

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

    How can I write a code to get a bipolar potentiometer to move one single LED up and down a strip of addressable LED lights you seem like the person to ask.

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

    Hi Dave.
    So how do you add the comment block? I get the feeling it’s not just -v you are stabbing??

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

    Hi Dave, greetings from New Zealand, great tutorials, any chance you can put up this code. for some reason i am getting error on the compile
    src/marquee.h:11:18: error: 'NUM_LEDS' was not declared in this scope im wondering what ive missed, it also cant find g_leds

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

      Try grabbing the code from Episode 06 and see if it runs for you, you can find it here: github.com/davepl/DavesGarageLEDSeries/tree/master/LED%20Episode%2006

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

      @Glen and Robyn Daniel! Hello. Have you solved that NUM_LEDS and g_leds error? Have same and do n ot know, whats wrong..

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

      @Glen and Robyn Daniel, I am right there with you. If I put the DrawMarquee() function in the main.cpp and it complies fine. If I put it in marquee.h it throws the error.

    • @dereksloan3233
      @dereksloan3233 3 роки тому +6

      I figured it out. The include statement for marquee.h needs to be made after you have declared the variables in main.cpp. There are a few hours of my life I will not get back :)

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

      The episode 6 code doesn't fix the marquee.h file- but Dave added it to the other LED drawing functions. Just add this line to the header file and it should work! It lets the header file know that the g_LEDs variable is within an external scope.
      extern CRGB g_LEDs[];

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

    Hi Dave, so I have had an issue that i cannot find a solution to, would you have any idea where i might look? when i build in vscode it succeeds, when I upload in vscode it succeeds or so its says, however the heltec display goes blank, any activity in my led strip halts. colours remain on, just the moving effect freezes.
    I have managed to follow each of the episodes in this series by writing them up in VScode, the intellisense is good there, and then copy pasting the whole code into the Arduino software and uploading from there. i had to download the board info in arduino and the libraries etc, i managed that ok. however for some reason i cannot get VScode to compile and actually see any changes in the strip or on the display, yet if i cut paste the same code into arduino it works there.
    Are there any sneaky checkboxes in settings that you know of that i may have missed? I have scoured through all the episodes thus far trying to find what i missed with no luck.
    any thoughts?
    thanks, and Merry Christmas!

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

      Solved it! had to reinstall the drivers! ooh these effects are very cool!

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

    FastLED still does not support RGBW though.

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

    Hello dave!

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

    Does anybody managed to install PlatformIO on macos using VSCode? I don't neither on mac nor windows :(

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

      I'm running PlatformIO under VSCode on MacOS Catalina. Where are you having trouble?

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

      @@DavesGarage it couldn't install PlatformIO Core. "Error: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /packages/38/6e/81a76ed61366ae04c2090ddac25e43c503f216912d582e81279e724ed0ff/platformio-5.0.1.tar.gz WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))': /packages/38/6e/81a76ed61366ae04c2090ddac25e43c503f216912d582e81279e724ed0ff/platformio-5.0.1.tar.gz WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect..."
      I cannot install it manually through terminal as well. It tries few times to establish connection, but it can't.
      Strange things are that I tried on three machines: macOS 10.15.3, 10.15.7 and on windows 10.