SK6812 RGBW LED strip 5M and 300 LEDs

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
Frank607
Posts: 192
Joined: Mon Mar 04, 2013 8:07 pm
Has thanked: 29 times
Been thanked: 15 times
Contact:

SK6812 RGBW LED strip 5M and 300 LEDs

Post by Frank607 »

I have a SK6812 RGBW LED strip 5M and 300 LEDs.

I want to use this strip with two PIR sensors and must only work when it gets darker.
Does anyone has a working .fcfx file for this LED strip ?

Thanks,

Frank

chipfryer27
Valued Contributor
Valued Contributor
Posts: 665
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 203 times
Contact:

Re: SK6812 RGBW LED strip 5M and 300 LEDs

Post by chipfryer27 »

Hi

I haven't personally used the strip, but as FC has components for all aspects of your project you should be able to achieve it.

Component Libraries > Outputs has the SK6812 listed
Component Libraries > Sensors has PIR and Light Sensors listed

You probably will want to set the strip to 1D with 300 LEDs.

HTH

Regards

Frank607
Posts: 192
Joined: Mon Mar 04, 2013 8:07 pm
Has thanked: 29 times
Been thanked: 15 times
Contact:

Re: SK6812 RGBW LED strip 5M and 300 LEDs

Post by Frank607 »

Thanks,

But I need a .fcfx so that I can see what chip is used and how you program it. I need a start :-)

Frank

chipfryer27
Valued Contributor
Valued Contributor
Posts: 665
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 203 times
Contact:

Re: SK6812 RGBW LED strip 5M and 300 LEDs

Post by chipfryer27 »

Hi

I haven't used these before but I can probably knock up an example later. Whether it works or not is a different story...:)

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 665
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 203 times
Contact:

Re: SK6812 RGBW LED strip 5M and 300 LEDs

Post by chipfryer27 »

Hi

I don't know if this will work in Hardware but it works in simulation.

In the attached example, the SK6812 component has been set to 1D with a total of ten LEDs in the string. You can easily change this to suit.

The chart can then be broken down into three parts after we initialise the component.

White Loop
This flashes all LEDs on and off three times

Red Loop
Does the same except the colour is Red

Blue Run
"Runs" a blue LED from beginning of the string to the end using a counter.

You could of course set any of the RGBW values to whatever you wish (0 minimum / 255 Maximum) and you can create whatever colour you want using the appropriate RGB combination.

When you make any change, for example set LED number 5 to whatever, nothing actually happens to the LED string. Changes are made in RAM and only then "clocked" out when you issue a Refresh Command (you could perhaps think on this command as "Apply").

This is just a very basic example but hopefully will show you how to control the string. I have used a PIC but the good thing about FC is that the code will pretty much be the same irrespective of target, just select whatever you want under Project Options.

Do note though that smaller chips won't be too suitable as a controller due limited RAM.

Hope this helps.

Regards
Attachments
Example.fcfx
(12.22 KiB) Downloaded 125 times

Frank607
Posts: 192
Joined: Mon Mar 04, 2013 8:07 pm
Has thanked: 29 times
Been thanked: 15 times
Contact:

Re: SK6812 RGBW LED strip 5M and 300 LEDs

Post by Frank607 »

Thanks chipfryer27.

I will try this next week if I can find the chip. This week í'm too bussy with other things. Sorry :-)

chipfryer27
Valued Contributor
Valued Contributor
Posts: 665
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 203 times
Contact:

Re: SK6812 RGBW LED strip 5M and 300 LEDs

Post by chipfryer27 »

Hi

It should work with most chips as long as they have a decent amount of RAM available. For 300 leds I'm guessing you will want at least 1.5K as the leds will probably need around 1.2K. The chip I used in the example has 1K so will probably only work with up to 200 or so.

Let us know how you get on.

Regards

Post Reply