FastLED Basics Episode 2 - Color: RGB and HSV

  Рет қаралды 105,008

Scott Marley

Scott Marley

Күн бұрын

Пікірлер: 134
@MarkBowenPiano
@MarkBowenPiano 4 жыл бұрын
I'm just starting out with Arduino programming and FastLED and your tutorials are by far and without a doubt the easiest tutorials out there to follow along with. Absolutely excellent work. Thank you!
@Richie_
@Richie_ 3 жыл бұрын
Same here. Now I can use my colours of choice easily.
@bgarnreiter89
@bgarnreiter89 3 жыл бұрын
Truly, I have only seen Ep 1 & 2 but I can safely say that this feels like a college course on this subject. I have been spinning my wheels with my NeoPixels for WEEKS and you just taught me more in these 20 min than nearly all that time combined. Truly, thank you so very much, I cannot wait for the rest of the episodes!
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you, I'm so glad these videos are helpful to people :)
@bgarnreiter89
@bgarnreiter89 3 жыл бұрын
@@ScottMarley Random question, but do you do any online tutoring in this subject? I have a project I am dead stuck on and worry I am in over my head!
@baschdiawd9784
@baschdiawd9784 2 жыл бұрын
I love you so much for this tutorial. You gave me so many informations I can use for my Ws2812 project. Thank you
@turnerkirk4600
@turnerkirk4600 4 жыл бұрын
This is an absolutely FANTASTIC resource! I've used FastLED quite a lot for a few years now across a variety of projects, but due to the sheer size and complexity of the library I'm still learning how to use it! The creators of FastLED are obviously incredibly talented at building this incredible piece of technology but there isn't a handbook for it. Certainly not for beginners and it's even difficult for someone like myself who sort of knows what I am doing. I think the way you're presenting information and actually explaining how the different parts work with your examples posted to Github is truly an asset to the FastLED community. Keep up the phenomenal work!
@photogyulai
@photogyulai 2 жыл бұрын
just wow! examples + video >> no question! That is teaching!
@ScottMarley
@ScottMarley 2 жыл бұрын
Thank you :)
@horace577
@horace577 3 жыл бұрын
Fantastic colour explanation, I have been trying to use these things for years, excellent stuff!!!
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you!
@dm6864
@dm6864 3 жыл бұрын
The best tutorials for learning fast LED functions, many thanks for you effort.
@embedded-academy
@embedded-academy 3 жыл бұрын
Dear D M I hope you like this FastLED Arduino simulator here: wokwi.com/arduino/libraries/FastLED Please let me know if you find this useful!
@3D-Amir
@3D-Amir 4 жыл бұрын
Thank you for these great tutorials. I slowly begin to understand FastLED, which I didn't from other tutorials from other sources. Plz keep up your great tutorials. I enjoy them alot
@alheeley
@alheeley 3 жыл бұрын
I'm loving this series youve created, very well presented and what a great visual way of learning about programming and direct effects of changing parameters and functions. Great work!
@ScottMarley
@ScottMarley 3 жыл бұрын
Glad you enjoyed it, thank you for your comments :)
@alheeley
@alheeley 3 жыл бұрын
@@ScottMarley @13:00 Can you help with some simple code to replace the pot with a rotary encoder? I'm struggling again here!
@AsbestosCrisis
@AsbestosCrisis 2 жыл бұрын
Thanks for explaining those fastLED functions, really helped get a handle on this new environment!
@Willpowerstudios
@Willpowerstudios 4 жыл бұрын
thank you so much for sharing your knowledge. I'm learning new things about FastLED thanks to your video :)
@Walletau
@Walletau 4 жыл бұрын
Really great run down, thank you. I jumped into the deep end slightly and it's great to get this foundational knowledge.
@ScottMarley
@ScottMarley 4 жыл бұрын
These things a while to make so I'm really glad it's in someway useful!
@EditingApprentice
@EditingApprentice 2 жыл бұрын
Fantastic tutorials, have helped me a bunch. Thanks very much for taking the time to make these
@kobedde
@kobedde Жыл бұрын
Very well explained. Just what I needed. 👍👍
@matthiash.454
@matthiash.454 4 жыл бұрын
This video again explains everything perfectly
@saniyosh8489
@saniyosh8489 3 жыл бұрын
Ever heard of perfect tutorials? Well this is one of them.
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you, that's very kind
@jamiesony3859
@jamiesony3859 4 жыл бұрын
Amazing. Very well explained. You deserve more subs!
@ScottMarley
@ScottMarley 4 жыл бұрын
Much appreciated!
@Keeping_IT_Simple
@Keeping_IT_Simple 4 жыл бұрын
Really good explanation of the various colour spaces / functions to be found within Fastled. Not only that but the background information will be really useful when dealing with other lighting projects even if not Fastled based Thanks 👍
@anderslykke6048
@anderslykke6048 4 жыл бұрын
Great introduction to the FastLED library - Thank you for taking the time to walk people through this. I'm really looking forward to seeing when you start with LED matrix and Palette's - I think the Fire that you use on your mask might be a good example.
@ScottMarley
@ScottMarley 4 жыл бұрын
Thanks, working on the palettes one at the moment. I won't be used fire as an example as the code is too complicated for a basics series, but it might get a showing as the series goes on.
@Dnzn
@Dnzn 3 жыл бұрын
Rlly insane video bro, nice explaining and also cool examples
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you, glad you liked it!
@joeb.fromsydneyaustralia5313
@joeb.fromsydneyaustralia5313 2 жыл бұрын
Loving this course.... Question: You mention "Microseconds" at Time: 8:20, but I can't seem to make it work or find any reference to it online. Your advise please?
@getyerspn
@getyerspn 4 жыл бұрын
Nice , you really put a lot of work into these videos and the editing..it shows.. thank you.
@HeyzDexy
@HeyzDexy 4 жыл бұрын
best led strip tutorials on youtube
@apermonti4180
@apermonti4180 3 жыл бұрын
AMAZING, Thanks a lot Scott
@Richie_
@Richie_ 3 жыл бұрын
Just what I've been looking for. Excellent video. If using usb to power the strip I always use for safety; #define VOLTS 5 #define MAX_AMPS 500 //value in milliamps and FastLED.setMaxPowerInVoltsAndMilliamps(VOLTS, MAX_AMPS); in the set-up.
@arthurspapa
@arthurspapa 3 жыл бұрын
Wow, man! You taught me so much with these videos so far and I’m going to be using this to build a 10 foot indoor gecko habitat with 24/7 natural lighting. Thank you so much
@ScottMarley
@ScottMarley 3 жыл бұрын
Great! Show us a picture when you're done!
@Diana-bq9fw
@Diana-bq9fw 3 жыл бұрын
Thank you! This is amazing, I need to know as much as possible about programmable LEDs as I am currently doing my own programmable LED persistence of vision pois and staff! I love this, I am learning so much!
@ScottMarley
@ScottMarley 3 жыл бұрын
Awesome! I'm working on a POV thing at the moment (just a normal spinning arm) so there will definitely be a video about that on my channel at some point. Good luck!
@embedded-academy
@embedded-academy 3 жыл бұрын
Hello Diana I am glad that you too liked this wonderful tutorial. Also, welcome you to th world of FastLED simulator here: wokwi.com/arduino/libraries/FastLED
@marcvanteeffelen8288
@marcvanteeffelen8288 3 жыл бұрын
Wow, this is very useful information. Thanks
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you!
@marcvanteeffelen8288
@marcvanteeffelen8288 3 жыл бұрын
@@ScottMarley because i am not so good in programming .your video's are superb for me. Now i understand more of the programming of HSL. IT's amazing. Thanks.
@rustycage55
@rustycage55 4 жыл бұрын
This are the best Fastled video tutorial series in the whole web! thank you very much for your effort, you got pretty fine teaching skills. (I wanted to thank you for this tutorials by using the Amazon Associate links on the video description but they show as unavailable. Pls update, thanks!)
@ScottMarley
@ScottMarley 4 жыл бұрын
Thank you, I am a teacher in my 'real' job ;) I've just checked the Amazon links here and they work for me, I'm not sure if maybe they don't work outside of the UK / US? I'm pretty new to all this... If you really want to support me, I do have a donations page here www.buymeacoffee.com/scottmarley but only if you desperately want to! Thanks again.
@joeb.fromsydneyaustralia5313
@joeb.fromsydneyaustralia5313 2 жыл бұрын
From Video Time 11:05... This one I'm having trouble getting my head around.... The way I'm reading the code , it is (as you describe) 'supposed to' start at the far end and copy it to the one before it (going towards LED 0).... But it doesn't - it starts at LED 0 and increase towards the far end - not from the far end? In the video 'LED strip demo' (at the screen bottom) I assume that your first LED [0] is to the left of the screen, in which case, like mine, it's starting at LED [0] and increasing... which is at odd to the verbal desciption AND what the code appears to warrant. Your advice please?
@ScottMarley
@ScottMarley 2 жыл бұрын
The explanation and code are correct, but I understand that it may be confusing. I'll try to explain... We want the pattern to scroll from left to right. We have 18 pixels so the last pixel is index 17. We take pixel 16 and copy it to 17, then 15 and copy it to 16, 14 copied to 15 etc all the way through the array. Finally we call FastLED.show which updates the strip with our new positions, and it appears as though the pattern has moved from left to right by one pixel. We then repeat the process, call fastled.show and in this way we gat a scrolling pattern effect.
@joeb.fromsydneyaustralia5313
@joeb.fromsydneyaustralia5313 2 жыл бұрын
Thanks @@ScottMarley ... 'I'm loving' your course! If your LED [0] is at the far left of the video screen then yours is flowing from LED [0] towards LED [17], just as mine is doing... ...however if your LED [0] is at the far RIGHT of the video screen then yours is flowing FROM LED [17] , (as you describe) which mine is not? (... and I have the same code, copied below). Here is my complete code (which is for 144 LED strip of 1metre)... have I missed something? (oh... and I've added a clear all and delay so I can study it unfolding)/// Mine flows from LED[0] towards LED[144]... //******************************************************************************************* #include #define LED_TYPE WS2812B #define DATA_PIN 10 #define NUM_LED 144 CRGB leds [NUM_LED]; void setup (){ FastLED.addLeds(leds,NUM_LED); FastLED.setBrightness(50); //CLEAR ALL fill_solid(leds,NUM_LED,CRGB::Black); // Make all black/off FastLED.delay(500); //...for this period in mSecs. } void loop (){ //CREATE A NEW PIXEL FOR LED[0] leds[0] = CHSV(160, random8(),random8(100,255)); //COPY EACH PIXEL TO THE NEXT ONE, STARTING AT THE FAR END // THEREBY 'MOVING' THE PATTERN ALONG THE STRIP. for(int i =NUM_LED-1; i > 0; i-- ){ leds[i] = leds [i-1]; } FastLED.show(); FastLED.delay(500); } //******************************************************************************************* Thanks Scott... really appreaite your help and I'm really trying to figure it all out myself before I impose myself on you as I don't want to a 'pain'. Regard Joe B.
@ScottMarley
@ScottMarley 2 жыл бұрын
@@joeb.fromsydneyaustralia5313 you're misunderstanding what I'm saying I think. The pattern moves from left to right, from 0 to NUM_LEDS as you say. But to make the pattern do that, you copy each led to the next one starting at the far end (right) of the strip. Look at the code. The for loop goes from NUM_LEDS - 1 (the far end of the strip) to 0. Once you've gone all the way from right to left through the LEDs, the result is that you have moved all of the LEDs from left to right by 1 position. I don't think I can explain it any better than you just reading the code.
@joeb.fromsydneyaustralia5313
@joeb.fromsydneyaustralia5313 2 жыл бұрын
@@ScottMarley Thanks for that Scott.... GREAT course.... really enjoying it. Oh - and thanks for taking the time to reply.
@yiqiaowang9874
@yiqiaowang9874 Жыл бұрын
goat LED online course
@rupash88
@rupash88 3 жыл бұрын
Brilliant. Keep making informative videos like this for Ardunino and you will, have 100k+ subscribers in no time. Even a tutorial on ardunio coding. Thanks.
@orbita1
@orbita1 9 ай бұрын
It says something when I'm spending my 10pm - 1am Saturday night watching this playlist! Did you learn most of this by perusing the library methods?
@gamersklub9714
@gamersklub9714 4 жыл бұрын
awesome explanation in very easy terms...thank u sir...
@ScottMarley
@ScottMarley 4 жыл бұрын
Thanks dude
@officebroomer
@officebroomer Жыл бұрын
Fantastic tutorials! Thanks.
@BooBar2521
@BooBar2521 3 жыл бұрын
Thank You man You helped me a lot
@TheOnlyTominator
@TheOnlyTominator 3 жыл бұрын
Very informative - thanks!
@MartyAckerman310
@MartyAckerman310 3 жыл бұрын
At 16:36, there's a discrepancy between what you say in the video and the code. In the code, you map to 0 to 200, and in the video you say you map from 0 to 255. Great video, I'm going to watch the rest in the series also. Looking forward to creating some cool Christmas decorations!
@5VoltChannel
@5VoltChannel 4 жыл бұрын
Waiting episode 3. 😁👍👍
@ScottMarley
@ScottMarley 4 жыл бұрын
It's here!
@TheQuietfiresnag
@TheQuietfiresnag 3 жыл бұрын
Like many, I am thrilled to find these tutorials. I've been cobbling patterns together for years with now real understanding of how powerful of a library fastLED is. I am resisting the urge to go back through everything I've done so far and rewriting it. But new code will definitely be making more use of what I learn here. Where does one locate that cool color picker you are demoing with?
@MrBlackFiction
@MrBlackFiction 4 жыл бұрын
THANK YOU FOR THESE VIDEOS! YOU ARE AWESOME!
@AntonLock
@AntonLock 2 жыл бұрын
Hi Scott, thanks so much for the tutorials! Is it possible to use or copy parts of the FastLED example section and paste them into your own Sketch...e.g. there's a part in the DemoReel100 called Void Sinelon which is like a "comet" effect which i'd like to use but can't figure out how??? Thanks
@InvisibleZed
@InvisibleZed 3 жыл бұрын
brilliant explanation. Thankyou
@ScottMarley
@ScottMarley 3 жыл бұрын
You are welcome!
@kirznervadim7072
@kirznervadim7072 2 жыл бұрын
Why speed not changed, if I change EVERY_N_MILLISECONDS(10) to 10 or 5, I expect to see rainbow move faster. But I see speed not changed. Please help.
@ScottMarley
@ScottMarley 2 жыл бұрын
It should change unless your driving a lot of pixels in which case the Arduino might not be keeping up. If that's not the case then I have no idea why it wouldn't be behaving correctly
@kirznervadim7072
@kirznervadim7072 2 жыл бұрын
@@ScottMarley Thank you for the answer. I use 36 pixel (60pcs per 1m) same chipset WS2812B , and i use same code. Do you think that 36 pixels can be a problem?
@ScottMarley
@ScottMarley 2 жыл бұрын
@@kirznervadim7072 @Kirzner Vadim I think it's just too fast an update rate for the Arduino. 17ms is about 60fps, 33ms is 30fps. I would set it to about 20ms as that gives a very smooth frame rate. Then if you want the pattern to go faster, change hue++ to hue += 2 or a larger number.
@kirznervadim7072
@kirznervadim7072 2 жыл бұрын
@@ScottMarley thank you it works as expected
@paulpease8254
@paulpease8254 4 жыл бұрын
So helpful, thank you!
@ScottMarley
@ScottMarley 4 жыл бұрын
Glad it was helpful!
@Rider0fBuffalo
@Rider0fBuffalo 3 жыл бұрын
Good video. Been trying to find an existing method that converts hsv to FastLeds 1byte rainbow hsv. Is that in the library?
@Sysshad
@Sysshad 9 ай бұрын
Superb video
@creativeboy1833
@creativeboy1833 3 жыл бұрын
Is there any function in the FastLED library by which we can query which color does an led have or wheter it is on or off? Thank You
@ScottMarley
@ScottMarley 3 жыл бұрын
It depends what you want to do. CRGB color = leds[0] creates a CRGB object called color and stores the color of LED 0 into it. You can then use this color somewhere else. Or you can get the red, green or blue values using leds[0].r to get the red value (or .g and .b for green and blue).
@bentebrunsvelt319
@bentebrunsvelt319 3 жыл бұрын
Thanks from holland👍👍🇳🇱😎
@ScottMarley
@ScottMarley 3 жыл бұрын
No problem 👍
@Aetohatir
@Aetohatir 2 жыл бұрын
I found these tutorials very inspiring, and I have a particular project in mind, but I'm not sure it will work the way I imagine, with power requirements and everything. Can I describe this idea to you somewhere and you tell me if I am overestimating the possibilities? That would be great.
@stevenfontes6005
@stevenfontes6005 2 жыл бұрын
Let's say I want different parallel strips with a separate signal LED_PIN. Would I need to go into the .h library to add this LED_PIN2 and LED_PIN3? Or do I need to just add this #define LED_PIN2 etc in the sketch?
@PatrikNeunteufel
@PatrikNeunteufel 3 жыл бұрын
thanx for your teaching. i have a problem with using multiple EVERY_N_MILLISECONDS (and ...SECONDS); in the first one, i run some code to toggle some LED's on or off every 5 seconds, in the second one, i change the brightness in steps of 10, between 0 and 200, what mean in that 5 seconds, the LED are ON, it should change multiple times from dark to bright. Bit it does not, the blinking works. but when i comment out the toggling and just leave the led on, the changing brightness works as expected...
@ScottMarley
@ScottMarley 3 жыл бұрын
Hard to tell what the problem is without seeing your code. Can you paste you code to pastebin and link it here so I can have a look? Thanks.
@jeanetiennette5742
@jeanetiennette5742 4 жыл бұрын
we need more people like you on youtube. well done. Can you do a video on how to program led to have comet effect with rainbow colour please please :)
@devram8833
@devram8833 2 жыл бұрын
With this code: CHSV(hue + (i * 10) Are we multiplying what " i " is at currently, by 10? Say, we're looping and at the 7th LED. Is that code multiplying 7 * 10 and giving us that hue?
@ScottMarley
@ScottMarley 2 жыл бұрын
Every 15ms hue increases. This causes the rainbow to progress along the strip. The i * 10 part is saying that from one led to the next, we increase the value of the hue by 10. So when hue = 0, the hue of the LEDs goes 0, 10, 20... 15ms later, hue = 1, now the hues of the LEDs are 1, 11, 21 ... Etc
@devram8833
@devram8833 2 жыл бұрын
@@ScottMarley Thank you Scott. I did understand that how you explained it in the video. I suppose I was just confused on the literal aspect of the code: " i * 10 " would mean to me that wherever i currently am in the loop, say the 14th place, take that and multiply it by 10. I get what's happening 100% just not "why" i * 10 shifts the hue range by 10 for each led etc. Thank you for these great tutorials. They're easily the best on FastLED and Arduino in general
@ScottMarley
@ScottMarley 2 жыл бұрын
@@devram8833 it's hard to explain on here, but i is the LED number. So when it's the 0 led, you take hue and add 0, when it's the first led, take hue and add 10, for the second led, take hue and add 20 etc.
@devram8833
@devram8833 2 жыл бұрын
@@ScottMarley Hah! I feel silly now, that makes total sense. Total brain fart there. Thank you:)
@Marc_Miller
@Marc_Miller 4 жыл бұрын
Excellent :)
@k.chriscaldwell4141
@k.chriscaldwell4141 6 ай бұрын
Thank you.
@TheWWDproductions
@TheWWDproductions 3 жыл бұрын
What's the link to that color picker you're using?
@ScottMarley
@ScottMarley 3 жыл бұрын
I'm sorry I can't remember! Any color picker that has RGB and HSV values displayed will be fine.
@donaldmartin2640
@donaldmartin2640 3 жыл бұрын
This is a great series. I tried to use "leds[i],h = hue" . The compiler did not like it. Had to do leds[i]= CHSV("hue", sat, val). I changed the CRGB declaration to CHSV. That fixed the issue but then hated the "addLeds" part. Ideas?
@ScottMarley
@ScottMarley 3 жыл бұрын
Yes, the .h part was an error I'm afraid, I didn't notice until the video was already up. Sorry about that. What do you mean about addleds? That part won't change at all, they are always declared as CRGB and you can use HSV or RGB functions as you wish.
@donaldmartin2640
@donaldmartin2640 3 жыл бұрын
@@ScottMarley I thought I was going crazy. Thanks for the update. Stuff happens. :-)
@Lectro69
@Lectro69 3 жыл бұрын
Hi , thanks a lot for those amazing tutorials. When I write "leds[i].h = 100;" it says "struct CRGB has no member named 'h'", any idea of what I did wrong?
@ScottMarley
@ScottMarley 3 жыл бұрын
Yeah, I made a mistake on that one. Sorry!
@Lectro69
@Lectro69 3 жыл бұрын
@@ScottMarley my bad I should've read more comments before posting.
@beastold1320
@beastold1320 2 жыл бұрын
Is there a way to connect 2 different stripes to 1 Arduino and control them parallel but with different patterns?!
@ScottMarley
@ScottMarley 2 жыл бұрын
Yes. It's a bit complicated though if you're new to Arduino. You can search online for examples.
@Tigs62
@Tigs62 3 жыл бұрын
Adding a Pot: My board is a: "DOIT ESP32 DEVKIT V1" When I tried to add a pot, it didn't work, but came back with an error of: 'A1' was not declared in this scope I changed the define statement to: #define POT_PIN 2 and i connected the pot to Pin 4 of the board, which is listed as "ADC2 CH2" Then it works. I can't seem to find any other variation that gets a result. Any idea what i am doing wrong?
@ScottMarley
@ScottMarley 3 жыл бұрын
Ah, the ESP has different rules for naming. For example, you don't use A2, just use 2. And the pin number you use must be the GPIO pin number, not necessarily the number printed on the board. If you look at this image i2.wp.com/microcontrollerslab.com/wp-content/uploads/2019/03/ESP32-ADC-channels-pinout.jpg?ssl=1 you'll see that pin 4 is GPIO 2 which explains why it worked for you. You can also see a bunch of other pins that would work.
@Tigs62
@Tigs62 3 жыл бұрын
@@ScottMarley Thanks Scott. I am hoping that after your full course I will be able to make an LED clock using the ESP32 and FastLED. Lots of Clock projects use other boards or the Adafruit NeoPixel Library. I also find that they spend most of their videos showing how to make the box and skate over the code really fast. Not helpful.
@CharlesLGoodwin
@CharlesLGoodwin 4 жыл бұрын
Hi Scott, I love what you are doing - Making FastLED even faster by getting everyone quickly up to speed In fact this tutorial inspired me to mix some colours up on my led strips I noticed at 7:11 you provided the code line: leds[i].h = 100; But I'm not sure this will work. leds[num_leds] comprises of an array of type CRGB and is defined as: CRGB leds[num_leds] But the CRGB struct has no member labelled h, v or s and the compiler will tell you as such. So I can't do something like this: leds[i].h += 10 which is a crying shame :-( The line: leds[i] = CHSV (hue, saturation, value) doesn't in fact assign the CHSV object to leds[i] but automatically converts it to RGB on assignment Maybe I've missed something. Do you know of a way to increment the hue?
@ScottMarley
@ScottMarley 4 жыл бұрын
Damn, well spotted! That's a mistake as you say. You can only use .h to reference the hue of an HSV object. It would be very useful to increment the hue of a particular pixel sometimes but as far as I know it's not possible (without storing a separatre HSV array but this is not terribly memory efficient!). You *could* grab the RGB value from the led, use the rgb2hsv_approximate function to increment the hue and copy it back to the LED again although this is a lossy conversion so won't always be spot on, especially if run multiple times. Feel free to point out any other screwups, it's tricky to make these things without errors it turns out!
@CharlesLGoodwin
@CharlesLGoodwin 4 жыл бұрын
Thanks Scott, Don't beat yourself up. Your FastLED tutorials are a treasure trove of information :-) Thankfully my 'weapon of choice' is the ESP32 which is pretty hefty in the memory department so the array workaround should work just fine. After that, I just have to try out those sin waves . . .
@Lectro69
@Lectro69 3 жыл бұрын
@@ScottMarley Ok I got my answer :)
@TanishqIsHere
@TanishqIsHere 4 жыл бұрын
Thanks!👍
@Lann91
@Lann91 3 жыл бұрын
Those only work in a void loop? Tried to add them to switch cases, but nothing happened..
@ScottMarley
@ScottMarley 3 жыл бұрын
Not sure what you were trying to change, you'll have to be more specific. You can use all the color functions wherever you like, so there must be an error in how you've written you code.
@Lann91
@Lann91 3 жыл бұрын
@@ScottMarley I made the effects in separate void's, and called them in the cases, and now its working, i dont really know wtf happened, but i'm happy :D
@sjarkulf
@sjarkulf 4 жыл бұрын
The unit8_t hue = 0 isn't working for me any tips?
@ScottMarley
@ScottMarley 4 жыл бұрын
Explain how it isn't working. What does it do or not do. Any error messages?
@sjarkulf
@sjarkulf 4 жыл бұрын
@@ScottMarley The RGB strip doesn't do anything when i load the code to the Arduino, and in the IDE the code doesn't turn blue like yours. Im guessing it could have something to do with that, but no errormsg
@ScottMarley
@ScottMarley 4 жыл бұрын
@@sjarkulf do the other examples upload and run properly? This is hsvRainbow.ino correct? I've just noticed in that example NUM_LEDS is set to 150 for some reason. Make sure this is correct for your strip.
@sjarkulf
@sjarkulf 4 жыл бұрын
@@ScottMarley Other examples run fine yes.
@Madmandav
@Madmandav 3 жыл бұрын
The EVERY_N_MILLISECONDS you suggested still blocks all my other animations exactly like delay does for me. Am I doing something wrong? Here is my code snippet that is in a switch/case if that makes a difference. case 3: V = 99; do{ EVERY_N_MILLISECONDS(3){ V = V - 1; pixels.fill(pixels.Color(0, V, 0),P,1); pixels.show(); //delay(3); } } while (V > 0);
@ScottMarley
@ScottMarley 3 жыл бұрын
I'd have to see the full code to comment properly, can you post it on pastebin and link it here?
@Madmandav
@Madmandav 3 жыл бұрын
@@ScottMarley It's quite messy at the moment and I don't have a pastebin. Here is the complete void subroutine I have which I still need to take delay out of. It has been mind numbing for the last dew days trying to wrap my head around writing loops without delay. void Torpedo () { switch(FadeMode) { case 0: do{ EVERY_N_MILLISECONDS(10){ pixels.setPixelColor(P,0,V,0); pixels.show(); V++; } } while (V < 100); if (V=100) FadeMode = 1; case 1: pixels.setPixelColor(P,0,0,0); pixels.show(); delay(50); FadeMode = 2; case 2: pixels.setPixelColor(P,0,200,0); pixels.show(); delay(50); FadeMode = 3; case 3: V = 99; do{ EVERY_N_MILLISECONDS(3){ V--; pixels.fill(pixels.Color(0, V, 0),P,1); pixels.show(); //delay(3); } } while (V > 0); FadeMode = 0; } }
@ScottMarley
@ScottMarley 3 жыл бұрын
The problem is, I need to see exactly what your loop is doing, how and when it calls torpedo etc. You can use pastebin for free, you don't need an account or anything. When debugging code, you need to start with the simplest viable code, build up from there and test as you go. If your code is 'a mess' it's going to be much harder to see what's going on. I have some ideas why it might not be working, but without the code, it's just a guess.
@Madmandav
@Madmandav 3 жыл бұрын
I'm using an esp32 if that makes a difference.
@ScottMarley
@ScottMarley 3 жыл бұрын
@@Madmandav ahh, you're using the neopixel library. I was wondering why it looked weird! I've never used that library, I just write everything in FastLED. If I have time, I'll have a look anyway, but no promises as I have no experience with the neopixel lib.
@chillzwinter
@chillzwinter 2 жыл бұрын
You sir earn one subscribe.
@Wil_Bloodworth
@Wil_Bloodworth 9 ай бұрын
HSL... L stands for Luminance not Level.
@nathanhyten3705
@nathanhyten3705 3 жыл бұрын
I just wanna express my gratitude to Dr Osade on KZbin for curing my HSV 1&2. God will bless you.
@ScottMarley
@ScottMarley 3 жыл бұрын
Oh man, I hate it when my Hue, Saturation and Value starts playing up!
@markeaton7476
@markeaton7476 3 жыл бұрын
Thank you, great tutorial.
FastLED Basics Episode 3 - Palettes
13:05
Scott Marley
Рет қаралды 75 М.
FastLED Basics Episode 1 - Getting started
17:59
Scott Marley
Рет қаралды 290 М.
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
How to make a 16x16x16 LED CUBE at home with Arduino platform
20:09
Malt Whiskey
Рет қаралды 4,4 МЛН
FastLED Basics Episode 4 - Waves and blur
13:17
Scott Marley
Рет қаралды 67 М.
HOW TO USE WS2812B NEOPIXELS WITH FASTLED ON ARDUINO
24:32
Gadget Reboot
Рет қаралды 184 М.
3D Printed LED Infinity Cube Using FastLED, Arduino and ESP32
9:20
Scott Marley
Рет қаралды 160 М.
Controlling WS2812B RGB LEDs
6:34
Anas Kuzechie
Рет қаралды 48 М.
How to use Excel to Animate LEDs!  Arduino + WS2812 LEDs
17:01
Kevin Darrah
Рет қаралды 113 М.