Kevin, WoW! This is the very first time I have seen anyone, yes, anyone that has done a great project without a library for help. You have brought true fun of programming a good project back to all of us and proved it can be done, without any help. Thank you.
Wow...finally finished the video...great work. I ordered some of these leds tonight. I now need to look through your code, and watch the video again. I would not have expected you would achieve the needed timing.
Correct me if I'm wrong but the method this video explains is pretty much how FastLED runs under the hood. It's great that it goes to the extend of explaining everything but I think it's kind of dumb to reinvent the wheel when there are 2 great libs that you can use and work perfectly and have years of development behind them.
I love code like this. Excellent. Nudging NOPs in here and there to get the timing right is something I'm familiar with on old 8088 machines. Not exactly science, kinda like black electrical tape for code - but the thing is, it is 'exactingly' repeatable. So what if it isn't on the micron, the entire universe is analog anyway. The fact that it's 'just right' makes the code eloquent and even alive in its own aspect, because if you move the code to another processor it will behave differently. This is the art of the true programmer. Well done sir. It's been a while since I've seen it in action.
This video is so amazing! To be able to control LEDs from scratch was just what I needed so I can continue building my circuit and code without relying on libraries and the like. Subbed and favorited!
Excellent video! It is very useful, not only for programmable LEDs, but this way I am learning some tricks for fast outputing signals as well. Thanks again.
Great tutorial and EVEN better! I did get this to work on an ATTiny85! I modified the sample to work on my small panel with 40 LEDs and FANTASTIC! You MUST set the ATTiny to work at 16MHz PLL (if you do not want to use an external crystal). I found out how to set the fuse for 16MHz PLL. Thanks!!Also I tried to change the number of LEDs to a lower amount like 10 on the same string and I got a strange effect. Occasionally the led that was lit was out side the number of LEDs I set it to. So numberOfLEDs set to 10 but I was using the same panel. I think it was because the next time through the loop the timing did not reset the string and the data continued down the string. Interesting!
This is super helpful. I've been looking at other's examples, and this video is super clear in regard to how this all works. I think I might work on a version of this that uses a color palette instead for larger LED panels so they can still run from an Arduino.
Nice informative video on the details of how the electronics work for these LEDs! Suggest refactoring the code to separate concerns a bit. One function should update the array and another function should push data on the wire. That way the code is more self describing and you don't have to set a variable to -1 to change behavior.
Thanks for the video and walkthru of your code, especially when you explain the ''nop'' 8-) to adjust your tight timing, and it is very good you show the signals on the scope!! I was trying to probe the UpHere 6-pins from the fan/led controller, I think they use WS2813 as the led control is a 4 pins 5V,Gnd,Out,In where as fan is 12V,Gnd no speed control.
Check out the SK9822 LEDs. Slightly more expensive than WS2812 and they require a clock pin, but the transmission protocol they use is a lot simpler, they include a 32-level brightness setting for each LED, and I've experimentally been able to run my set at 3x the rate that the WS2812s are capable of before hitting the limit of what I could test.
Thanks for the video, I really appreciated being able to see the signalling on the scope. One comment, on your code, all of the "&& MASK" stuff is redundant and always true.
I love how you make programs!!, I will be a programmer like you one day :), please make more videos about your programming skills. cheers from argentina!
Is there any way to send the LED output do a different PIN? I'm using a Tinkerkad LCD module and D8 is not available. However, D6, D5, and D11 are available.
No need to repeat the same steps or add unnecessary "&&" comparisons which turns the value into a bool, (though I think you should be able to just use "&& true" to get the same result since any positive value should count as "true"). Just continue to use bitwise operators, particularly the "
I see the driver code - looks great, and clever to use the for loop instead of "wasting" cycles with NOPs. Where can we find an example .ino code that uses your function to create light patterns?
Hi there, this is pretty cool. But I was looking for a way to program static letters and numbers. I want to learn how to program and Arduino to scroll writing left to right, right to left, as well as top and bottom. But more importantly, how to get letters and numbers to snap in and out and fade in/out of each other. For example, a countdown from 10 to 1 fade out and in over each other. Is there a way to do this? Thanks.
Your timing is dependent on the clock speed of the processor which is fine if everyone runs this on a Nano or Uno but I know by experience that this screws up if you try to run it on a Due or Leonardo. You might want to have a look at Adafruit's Neopixel library which does cater for different performance CPUs.
thanks for this video dude, I'm wanted to get into LED and programming. For this chips with the build in driver, like the WS2812B, are you able to just program a single led and then just apply a power source and it will run through the programmed sequence with nothing else but the power?
Awesome! Changing the PORTB operations in the loop to inline assembly code could optimize it even more, but this is already fast enough. How about power though? How much juice will be flowing through port 8?
+Bas Groothedde they're quite cool, I used them to make a digital Rubik's cube. Saved me doing a lot of difficult wiring and PWM while still trying to make time to sense swipes etc. Only think I would recommend is that if you plan on using a lot, I'd make more than one power rail as opposed to the Vin Vout pins all being daisy chained together. The voltage drop will cause the problems the furthest LED colours otherwise.
I am using NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers but at start the LEDs start burning why its happened, Any idea? the Strip use multiple Amp according to Strip Colors is Constant -Current-Regulator necessary ? If Yes, Then how?
Best low level explanation I found on youtube! Thanks Using the '&&' is not needed I think. Both the lines will gives the same result I guess? PORTB = ((RGB[i] & B10000000) && B10000000) | Existingport; PORTB = ((RGB[i] & B10000000)) | Existingport; Also your code depends upon the clock speed of the microcontroller. I don't know if you mentioned the clock speed?
Hi, love this tutorial. I am wanting to make some LED juggling balls that can achieve some cool effects like your video. I have balls that glow but I want more than just colour change. What LEDs would be best for this? They would have to be able to withstand hard impacts when dropped. I will need to develop some sort of suspension system for the LEDs along with the central controller board. Can you point me in the right direction??
Hey I am new to Arduino programming and had a question. Can you use a similar program to turn all lights red except for randomly identified ones (1, 17, 54) as green? If so, I understood the high and low but how does it recognize the LED ID # and communicate which light to turn on?
Thank you for the video Dylan. Is this possible without an oscilloscope? I haven't purchased one yet. I don't even know which one to get on a limited budget. (Subscribed) I'm also interested why you didn't use one of the libraries like Adafruit.?
Awesome video ! I'm a total newb to programming and almost everything you talked about haha. I wanted to ask you, would I be able to integrate what you've gone over into making a custom taillight for my Yamaha C3/Vox project (motor bike) ?
fantastic video! i tried it on a cheap 1M 60 L.E.D strip from ebay and it works well. it twinkles slightly when its white but barely noticeable. looking at the code i cant work out why it keeps turning on and off white but if i take the delay out of the loop code it just goes crazy. any suggestions on how to get it to hold a colour?
I'm trying to work through using this with a set of RGBW LEDs, do you have any insight regarding this. I'm getting to kind of work, but the White keeps flashing while the LEDs that I assign a color to work fine.
Great videos man. U keep earning thumbs up.2 questions please: will it work on Digispark thumb arduino ? 2- Did you try making a low resolution screen/monitor using these addressable strips and Arduino ?
Do you think it's possible using a ring of addressable leds, with a little time to code, could make them function based off an input voltage? I'd like to have several back lit rings for my gauges in my car and run them based off inputs from speed and rpm signals then at a certain input have them all flash red for a shift light... I'm sure this will be a crazy sketch to write
I got a ws2812B LED Strip and I see recomendations to get a up to 1000µF Capacitor, but i can't see how much V they should be. And I found a 1000µF 25V capacitor. Is this ok or could it damage the strip?
I have a WS2812B led strip . with 180 RGB leds . I want to press button 1 . and have the 1st led on the strip blink , what i am trying to do , is have 6 buttons . each button controlling different actions on the RGB strip , and upon completion of each action , stop ,How can I accomplish this?? I have no clue where to even start . I have tried the Fastled library , I just know how to code it thank you , I know this is from 2016 , But hoping you can give me some help
Bought a strip with 60 LEDs and it works just fine :) You should consider putting that on github! A major improvement would be to use a class with methods leds.set() and leds.flush()
The data sheet is in Chinglish and I wanted to know the fastest buad? is it 800Kbps? what does "When the refresh rate is 30fps, cascade number are not less than 1024 points." mean? Does it mean "30fps is guaranteed for 1024 cascaded leds"?
Hi Kevin, great videos. I'm looking for a new scope after my Tek finally bit the dust and see you use the Rigol. Is that the 100MHZ? Have you ever used the the Hantek? I like the 7" screen and the 70MHZ is pretty reasonable. Thank you in advance for your thoughts.
+m t Had the 100Mhz Rigol for a few years - nice scope for day to day work, but I'd really kill for a 4 channel. Haven't really been looking though. 7" screen would be nice - reviews seem okay for the Hantek. Thanks for the tip!
Every second update of RGB_update turns all pixels white, I think this is related to WS2812pinHIGH = PORTB | 1; but I cannot find the source of the problem. Can anyone help me with advice? EDIT: Sorry for the stupid questing, the solution was your update. Cheers mate, great video!
Hey, i would like to make a little LED Strip-Clock project and plan to use a teensy or an arduino mini for it. But could you please tell me what would make it easier with this teensy compared to the arduino? Nice video, greetings
Slightly confused on how you connected the LEDs (specifically as it relates to your code & how addressable LEDs work, as I'm still learning). Did you take the output of the last LED in the first row to the top of the next row? Or did you go back up from the bottom unit?
Great video, good explanation. ONLY comment is you should space out the comments and stuff in your code so it would be easier for ys old timers to read. Also, use #defines for everything where a number appears in your code so you don't have to guess what the numbers are for. A.K.A. the "no magic numbers" rule in Software Engineering. Everything gets a name.
I think daisy chain connection is not reliable - if one wire in chain will be damaged - all next panels will be lost... So I search multiple pins solutions (one lost but others still working)...
Great tutorial and video! Love your videos. Very informative and precise. Quick question: This code is working for the Atmel 328. Could it work on an ATTiny? I used the Neopixel library on a tiny85 and it worked but it took up alot of space. BTW, I also have these same LEDs and the ones I have are using the WS2812B chip. But some others use the older WS2812 and the byte order is different. I mixed the during my experiment and was confused why some had different colors than expected. FYI Thanks Kevin!
+Kevin Darrah I tried it out on the ATTiny85 and at first it was black and nothing happened. I did figure out that the right pin on the ATTiny is data pin 0. So I fixed that and when I uploaded it and tried it I got all white and ever LED on. I tried it on my Arduino UNO and it worked great. I am thinking it is because the ATTiny is 8MHz and the Arduino is 16MHz so it might be a timing issue. I could not figure out if I needed half the clock cycles because the timing is slower by a factor of 2. Thanks! I am looking forward to using this because it is definitely smaller than using the NeoPixel or FastLED libraries.
It will work on the Tiny85 - I programmed the T85 using (UNO) 'Arduino as ISP' using the board manager - raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json Clock : Internal 16MHz Burn bootloader to set the fuses for the T85 to internal 16 MHz Then upload to the T85 thru the 'Arduino as ISP' I have some code to allow the use of (almost!) any port/pin. However PORTB,C PINs 3,5 don't work, and PORTD PINs 3,5,6 don't work on UNO & clones (tried on several boards)
Could you have used a bit shift to try and change how long it was written high for, rather than going over every 8 bits in your main loop? I'm thinking something like: //loop over all the values for (int i = 0; i < 135; i++) { //get the byte int b = RGB[ij]; //run the loop 8 times (don't actually use k) //import with the shift left and assign by 1 bit - this means you're always checking MSB for (int k = 0; k < 8; k++, b
+Ben Naylor Yea, I think I tried that early on - the one thing that bit me was when you hit the end of that internal for loop - now you've got double the checks when you're at the end of the loops. Could work though - let me know if you try this.
+Jens Andree FYI - I had a concept to drive the WS2812B with SPI and got close, but my timing drifted, so after about 10 LEDs or, so the color values would start shifting. I thought maybe fun electronics might've figured out to make it work?
i actually used spi with esp8266 se cnlohr_s videos for that but there he uses i2S interface on the chip i did the same it worked but as far as i went was spi
+Kevin Darrah Yep, that's my conclusion as well when I went down that hole a few years ago... Just couldn't get the timing to work in a stable manner. If someone can get spi working for WS2812B leds and similar then I'd be really keen to have a look at that solution! +fun electronics videos I will have a look at cnlohr_s for sure! :)
Kevin, WoW! This is the very first time I have seen anyone, yes, anyone that has done a great project without a library for help. You have brought true fun of programming a good project back to all of us and proved it can be done, without any help. Thank you.
It is really wonderful that you have grasped so thoroughly these concepts and take the time to explain them to others. Thanks!
Wow...finally finished the video...great work. I ordered some of these leds tonight. I now need to look through your code, and watch the video again. I would not have expected you would achieve the needed timing.
Finally, someone who doesn't use either NeoPixel nor FastLED, thank you for sharing this, great video !
Correct me if I'm wrong but the method this video explains is pretty much how FastLED runs under the hood. It's great that it goes to the extend of explaining everything but I think it's kind of dumb to reinvent the wheel when there are 2 great libs that you can use and work perfectly and have years of development behind them.
@@frank20a Except when your teachers specifically ask you not to use any of these libraries...
I love code like this. Excellent. Nudging NOPs in here and there to get the timing right is something I'm familiar with on old 8088 machines. Not exactly science, kinda like black electrical tape for code - but the thing is, it is 'exactingly' repeatable. So what if it isn't on the micron, the entire universe is analog anyway. The fact that it's 'just right' makes the code eloquent and even alive in its own aspect, because if you move the code to another processor it will behave differently. This is the art of the true programmer. Well done sir. It's been a while since I've seen it in action.
Thanks! This is great, I was scared when i saw how long the video was but you had good stuff to say. Good content!
This video is so amazing! To be able to control LEDs from scratch was just what I needed so I can continue building my circuit and code without relying on libraries and the like. Subbed and favorited!
got 60 2812B leds working so easily. your explanations are always so succinct. love your videos, thanks
+Clive Krugman awesome! good to hear!
Excellent video! It is very useful, not only for programmable LEDs, but this way I am learning some tricks for fast outputing signals as well. Thanks again.
Great tutorial and EVEN better! I did get this to work on an ATTiny85! I modified the sample to work on my small panel with 40 LEDs and FANTASTIC! You MUST set the ATTiny to work at 16MHz PLL (if you do not want to use an external crystal). I found out how to set the fuse for 16MHz PLL. Thanks!!Also I tried to change the number of LEDs to a lower amount like 10 on the same string and I got a strange effect. Occasionally the led that was lit was out side the number of LEDs I set it to. So numberOfLEDs set to 10 but I was using the same panel. I think it was because the next time through the loop the timing did not reset the string and the data continued down the string. Interesting!
This is super helpful. I've been looking at other's examples, and this video is super clear in regard to how this all works. I think I might work on a version of this that uses a color palette instead for larger LED panels so they can still run from an Arduino.
Nice informative video on the details of how the electronics work for these LEDs!
Suggest refactoring the code to separate concerns a bit. One function should update the array and another function should push data on the wire. That way the code is more self describing and you don't have to set a variable to -1 to change behavior.
Thanks for the video and walkthru of your code, especially when you explain the ''nop'' 8-) to adjust your tight timing, and it is very good you show the signals on the scope!!
I was trying to probe the UpHere 6-pins from the fan/led controller, I think they use WS2813 as the led control is a 4 pins 5V,Gnd,Out,In where as fan is 12V,Gnd no speed control.
Great explanation on your coding. Learned a lot watching your explanation and referencing the scope. Good stuff. Thanks
I really like your videos, they are from scratch! :) thank you!!!
Check out the SK9822 LEDs. Slightly more expensive than WS2812 and they require a clock pin, but the transmission protocol they use is a lot simpler, they include a 32-level brightness setting for each LED, and I've experimentally been able to run my set at 3x the rate that the WS2812s are capable of before hitting the limit of what I could test.
If your pixel has 6 soldering points, you have the WS2812 led. If it has only 4, then you have the WS2812B. Pretty sure about that.
3* is the WS2812B
How can they have 3? Vcc, GND, D-In, D-Out
They have V, GND, D-In at one end and V, GND, D-Out at the other end
BTW, I have 6-pin LED but FastLED.h library must be set to : FastLED.addLeds(leds, NUM_LEDS); to make it work correctly.
i want to use the 4 pin WS2812B instead of the 6 pin WS2812 , any videos on how to use that? reduces the number of solder points
Thanks for the video, I really appreciated being able to see the signalling on the scope. One comment, on your code, all of the "&& MASK" stuff is redundant and always true.
Thanks for taking the time to develope and share !!
Thanks for making such an awesome video! What did you use to diffuse your LEDS at 2:00?
I love how you make programs!!, I will be a programmer like you one day :), please make more videos about your programming skills. cheers from argentina!
So,
Is there any way to send the LED output do a different PIN? I'm using a Tinkerkad LCD module and D8 is not available. However, D6, D5, and D11 are available.
No need to repeat the same steps or add unnecessary "&&" comparisons which turns the value into a bool, (though I think you should be able to just use "&& true" to get the same result since any positive value should count as "true"). Just continue to use bitwise operators, particularly the "
wow thank you so much, I finally understand how to control those RGB lights now
i guess it is kinda off topic but do anybody know of a good place to watch new movies online?
@Ayden Isaiah I would suggest FlixZone. Just google for it =)
I see the driver code - looks great, and clever to use the for loop instead of "wasting" cycles with NOPs. Where can we find an example .ino code that uses your function to create light patterns?
Does this need an external power supply to drive or will the 5v frim the arduino work fine?
Excellent explanation Kevin and very clever code. Thumbs up
Good work, like seeing the score traces along w/ the code.
holy freakin cow, thanks for that awesome explanation. more rambling the better with these types of things ;p
Hi there, this is pretty cool. But I was looking for a way to program static letters and numbers. I want to learn how to program and Arduino to scroll writing left to right, right to left, as well as top and bottom. But more importantly, how to get letters and numbers to snap in and out and fade in/out of each other. For example, a countdown from 10 to 1 fade out and in over each other. Is there a way to do this?
Thanks.
Love this stuff. Could this be integrated into a colour organ?
I am interested in the first animation of blocks of color that randomly bounce around. Cannot find it anywhere.
Your timing is dependent on the clock speed of the processor which is fine if everyone runs this on a Nano or Uno but I know by experience that this screws up if you try to run it on a Due or Leonardo. You might want to have a look at Adafruit's Neopixel library which does cater for different performance CPUs.
in the for loopp couldnt you have set )b10000000 to a variable and just shift it right by 1 bit each time in the loop
thanks for this video dude, I'm wanted to get into LED and programming. For this chips with the build in driver, like the WS2812B, are you able to just program a single led and then just apply a power source and it will run through the programmed sequence with nothing else but the power?
hi Kevin. Thanks . I don’t see how to fetch the code listing for download and experiment. Please advice. J
Awesome! Changing the PORTB operations in the loop to inline assembly code could optimize it even more, but this is already fast enough. How about power though? How much juice will be flowing through port 8?
+Bas Groothedde power should be no prob - that digital pin 8 is just used for data pin, not to actually power the LEDs
Kevin Darrah Ah got ya, I have never used these leds, so I didn't know that. I'll be ordering a few soon then haha
+Bas Groothedde they're quite cool, I used them to make a digital Rubik's cube. Saved me doing a lot of difficult wiring and PWM while still trying to make time to sense swipes etc.
Only think I would recommend is that if you plan on using a lot, I'd make more than one power rail as opposed to the Vin Vout pins all being daisy chained together. The voltage drop will cause the problems the furthest LED colours otherwise.
+CSmyth89 also also, from what I recall (from very quick current tests @ 5V current per individual LED =17mA so full white brightness is about 51mA
CSmyth89 good advice, thanks!
Hi Kevin, do you have the connection plan for the LEDs? Can you share the connection plan with me?
I am using NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers but at start the LEDs start burning
why its happened, Any idea?
the Strip use multiple Amp according to Strip Colors
is Constant -Current-Regulator necessary ? If Yes, Then how?
Excellent video. As any of them, actually :)
Keep up the good work & ideas ;)
Excellent Video. Very well explained. Thanks.
thank you for posting a code that works great work
Best low level explanation I found on youtube! Thanks
Using the '&&' is not needed I think.
Both the lines will gives the same result I guess?
PORTB = ((RGB[i] & B10000000) && B10000000) | Existingport;
PORTB = ((RGB[i] & B10000000)) | Existingport;
Also your code depends upon the clock speed of the microcontroller. I don't know if you mentioned the clock speed?
Hi, love this tutorial. I am wanting to make some LED juggling balls that can achieve some cool effects like your video. I have balls that glow but I want more than just colour change. What LEDs would be best for this? They would have to be able to withstand hard impacts when dropped. I will need to develop some sort of suspension system for the LEDs along with the central controller board. Can you point me in the right direction??
Hey I am new to Arduino programming and had a question. Can you use a similar program to turn all lights red except for randomly identified ones (1, 17, 54) as green? If so, I understood the high and low but how does it recognize the LED ID # and communicate which light to turn on?
Thank you for the video Dylan. Is this possible without an oscilloscope? I haven't purchased one yet. I don't even know which one to get on a limited budget. (Subscribed)
I'm also interested why you didn't use one of the libraries like Adafruit.?
Awesome video ! I'm a total newb to programming and almost everything you talked about haha. I wanted to ask you, would I be able to integrate what you've gone over into making a custom taillight for my Yamaha C3/Vox project (motor bike) ?
fantastic video!
i tried it on a cheap 1M 60 L.E.D strip from ebay and it works well. it twinkles slightly when its white but barely noticeable.
looking at the code i cant work out why it keeps turning on and off white but if i take the delay out of the loop code it just goes crazy. any suggestions on how to get it to hold a colour?
I'm trying to work through using this with a set of RGBW LEDs, do you have any insight regarding this. I'm getting to kind of work, but the White keeps flashing while the LEDs that I assign a color to work fine.
Very good - thanks for taking the time to explain!
Great videos man. U keep earning thumbs up.2 questions please: will it work on Digispark thumb arduino ? 2- Did you try making a low resolution screen/monitor using these addressable strips and Arduino ?
A great video but I'm not sure what causes each high or low to be a different amount of time.
Do you think it's possible using a ring of addressable leds, with a little time to code, could make them function based off an input voltage?
I'd like to have several back lit rings for my gauges in my car and run them based off inputs from speed and rpm signals then at a certain input have them all flash red for a shift light... I'm sure this will be a crazy sketch to write
I got a ws2812B LED Strip and I see recomendations to get a up to 1000µF Capacitor, but i can't see how much V they should be. And I found a 1000µF 25V capacitor. Is this ok or could it damage the strip?
I have a WS2812B led strip . with 180 RGB leds . I want to press button 1 . and have the 1st led on the strip blink , what i am trying to do , is have 6 buttons . each button controlling different actions on the RGB strip , and upon completion of each action , stop ,How can I accomplish this?? I have no clue where to even start . I have tried the Fastled library , I just know how to code it
thank you , I know this is from 2016 , But hoping you can give me some help
Sweet!! :)~ I want to make one for my scuba tank ..
Bought a strip with 60 LEDs and it works just fine :)
You should consider putting that on github!
A major improvement would be to use a class with methods leds.set() and leds.flush()
+MajorBreakfast cool! yea good idea
Thanks Kevin, another great video.
Do you know that you can use also the Adafruits Neopixel library? Its a way more comfortable then the Way you've done!
I'm using Ws2812B and I'm having trouble, how to adapt the code for this LED model?
for the code to run the bouncy ball as the one in the vid my one is running realy fast so how would i get the led to do what yours is doing
Thanks yet again Mr. Darrah!
Why haven't you used these leds for your 8×8×8 cube? Would make the needed electronics and wiring much simpler.
My brain just eploded!!! Thanks though for another great video!
Hi there. Is there a tutorial like this for WS2813?
Thanks Kevin, this is great video, really informative!
Any reason you can't run a bunch of there in parallel and have them all do the same thing at the same time?
First Comment! Your videos are awesome! I learn a lot from them. I hope you keep making them. Peace!
The data sheet is in Chinglish and I wanted to know the fastest buad? is it 800Kbps?
what does "When the refresh rate is 30fps, cascade number are not less than 1024 points." mean?
Does it mean "30fps is guaranteed for 1024 cascaded leds"?
hey pal cool vid! what did you use to diffuse the light, if i may ask?
can you use these leds without a micro-controller? if so what would the colour of the led be?
Hi Kevin, great videos. I'm looking for a new scope after my Tek finally bit the dust and see you use the Rigol. Is that the 100MHZ? Have you ever used the the Hantek? I like the 7" screen and the 70MHZ is pretty reasonable. Thank you in advance for your thoughts.
+m t Had the 100Mhz Rigol for a few years - nice scope for day to day work, but I'd really kill for a 4 channel. Haven't really been looking though. 7" screen would be nice - reviews seem okay for the Hantek. Thanks for the tip!
could you put 512 of these in series and make a 8x8x8 rgb led cube?
Wouldn't it be possible to use a counter and interrupts to time the code properly?
Every second update of RGB_update turns all pixels white, I think this is related to WS2812pinHIGH = PORTB | 1; but I cannot find the source of the problem. Can anyone help me with advice?
EDIT: Sorry for the stupid questing, the solution was your update. Cheers mate, great video!
Hey, i would like to make a little LED Strip-Clock project and plan to use a teensy or an arduino mini for it. But could you please tell me what would make it easier with this teensy compared to the arduino?
Nice video, greetings
+Can Ad I don't see why you couldn't use Arduino - the teensy would work better for large arrays of LEDs,
+Kevin Darrah Thank you :) I was just wondering why you put that Info box at around 0:40
when using this led strip does the pin have to have pwm or can it be an ordinary digital pin?
Slightly confused on how you connected the LEDs (specifically as it relates to your code & how addressable LEDs work, as I'm still learning). Did you take the output of the last LED in the first row to the top of the next row? Or did you go back up from the bottom unit?
Nevermind, I was finally able to pause it and see how it was done... from top to bottom then back to the top.
Great video, good explanation. ONLY comment is you should space out the comments and stuff in your code so it would be easier for ys old timers to read.
Also, use #defines for everything where a number appears in your code so you don't have to guess what the numbers are for.
A.K.A. the "no magic numbers" rule in Software Engineering. Everything gets a name.
how would you witch the colr of the array from green to another color
Cool! And what about multitasking? If I connect 3-4 LED panels to different pins - does it work?
right now it only works with one pin, but you could just daisy chain your panels
I think daisy chain connection is not reliable - if one wire in chain will be damaged - all next panels will be lost... So I search multiple pins solutions (one lost but others still working)...
A 1000 isn't a problem, I ran 999 of them without a problem. Although you need 5 volts supply every like 5 meters to not loose brightness
Great tutorial and video! Love your videos. Very informative and precise.
Quick question: This code is working for the Atmel 328. Could it work on an ATTiny? I used the Neopixel library on a tiny85 and it worked but it took up alot of space.
BTW, I also have these same LEDs and the ones I have are using the WS2812B chip. But some others use the older WS2812 and the byte order is different. I mixed the during my experiment and was confused why some had different colors than expected. FYI Thanks Kevin!
+Don Milton Don, should work with ATTiny, but you'll have to change the PORT stuff, so the right pin is used. Let me know if you try it out.
+Kevin Darrah I tried it out on the ATTiny85 and at first it was black and nothing happened. I did figure out that the right pin on the ATTiny is data pin 0. So I fixed that and when I uploaded it and tried it I got all white and ever LED on. I tried it on my Arduino UNO and it worked great. I am thinking it is because the ATTiny is 8MHz and the Arduino is 16MHz so it might be a timing issue. I could not figure out if I needed half the clock cycles because the timing is slower by a factor of 2. Thanks! I am looking forward to using this because it is definitely smaller than using the NeoPixel or FastLED libraries.
It will work on the Tiny85 -
I programmed the T85 using (UNO) 'Arduino as ISP'
using the board manager - raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
Clock : Internal 16MHz
Burn bootloader to set the fuses for the T85 to internal 16 MHz
Then upload to the T85 thru the 'Arduino as ISP'
I have some code to allow the use of (almost!) any port/pin. However PORTB,C PINs 3,5 don't work, and PORTD PINs 3,5,6 don't work on UNO & clones (tried on several boards)
will work on Tiny84
Thank you. You are the man!
exit status 1
'PORTB' was not declared in this scope
hi, it is an amazing work but it doesn't work for me with the arduino mega 2560 can you help me please
Could you have used a bit shift to try and change how long it was written high for, rather than going over every 8 bits in your main loop?
I'm thinking something like:
//loop over all the values
for (int i = 0; i < 135; i++) {
//get the byte
int b = RGB[ij];
//run the loop 8 times (don't actually use k)
//import with the shift left and assign by 1 bit - this means you're always checking MSB
for (int k = 0; k < 8; k++, b
+Ben Naylor Yea, I think I tried that early on - the one thing that bit me was when you hit the end of that internal for loop - now you've got double the checks when you're at the end of the loops. Could work though - let me know if you try this.
where can i find the code down load for addressable Leds with Arduino! WS2812b
The Adafruit Neo Pixel Lib. work on every pin, why doesn't this awesome method work as well? I havn't tried it out yet, but i will.
I haven't really had a chance to test that, but it's because I had to avoid bit shifts, but by using the first bit PB0, I didn't have to shift....
Thank you for sharing this!
What kind of capasitor do you use ?
You asked how many LED's I could control, well, simple, your code and tutorial made me control one led out of 512. 🙁
Can you do a video on SK6812
So you can make it reacting to music?
What kind of capacitor do you use exactly?
Thanks for your video. Is it on 5V, or 12V?
5V
thank you !!
Where can the leds be bought? I live in Europe. Any Chinese trader?
What is the diffusor made of? Is that a piece of cloudy plastic?
yep, just some packing material
系统找不到指定的文件。The system can not find the file specified.
you can also do it with spi and interrupts.worked for me
+fun electronics videos cool, would like to see how you did it
+fun electronics videos Not with WS2801/WS2811/WS2812B or have I missed something?
APA102 uses SPI but that's a different LED altogether...
+Jens Andree FYI - I had a concept to drive the WS2812B with SPI and got close, but my timing drifted, so after about 10 LEDs or, so the color values would start shifting. I thought maybe fun electronics might've figured out to make it work?
i actually used spi with esp8266 se cnlohr_s videos for that but there he uses i2S interface on the chip i did the same it worked but as far as i went was spi
+Kevin Darrah Yep, that's my conclusion as well when I went down that hole a few years ago... Just couldn't get the timing to work in a stable manner.
If someone can get spi working for WS2812B leds and similar then I'd be really keen to have a look at that solution!
+fun electronics videos I will have a look at cnlohr_s for sure! :)
very nice, thanks for the tutorial !