WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

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

Moderator: Benj

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by Benj »

Hello,

I've been hard at work crafting some new components. One for the WS2801 LED IC and another for the WS2811/WS2812 and WS2812B LED IC.

Help and working examples for the components can be found here on the wiki.

WS2801
http://www.matrixtsl.com/wikiv7/index.p ... 8276ad8bdf

WS2811
http://www.matrixtsl.com/wikiv7/index.p ... e17e6ba12b

The components both currently have a bug where they don't render properly when you first drag them onto the panel. You have to drag them on, save your project and reload your project. Then they should appear correctly. I am investigating this problem now.

Here are the components. To add them to your v7 installation simply copy the files into your "Flowcode 7/components" directory.
LED_WS2811.fcpx
(11.24 KiB) Downloaded 435 times
LED_WS2801.fcpx
(11.18 KiB) Downloaded 408 times
If you have a go with them then let me know how you get on.

In the future I want the ability to draw text, bitmaps and perform rotations. If you have any other requirements then please let me know.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Ben,

Great news, just playing with these now.....

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Ben,

I have just tried the 3 examples for the above components but only the mood lighting example will run simulation the other 2 throw up the following:
Screenshot 2016-08-25 21.44.02.png
(135.81 KiB) Downloaded 4633 times
Screenshot 2016-08-25 21.44.42.png
(120.92 KiB) Downloaded 4633 times
Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by Benj »

Hi Stuart,

Thanks for letting me know. I'll get those fixed.

I think the examples are just missing a parameter. I think I added a new one to the ShiftLeds function to add extra draw modes. Just double click the icon and check for missing values and then the sim should run.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by jgu1 »

Hi Ben!

Tryed to play with your new component today.

But I get this message when I try to simulate, even if I save and opened again.

When I go in the component proberties I cant se " Initialise".

Have a look on the att.. printscreen saved in Paint. please

Br

Jorgen
Attachments
WS28xx.png
Errormessage
(117.33 KiB) Downloaded 4606 times

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi guys,

Just to confirm, until this is fixed, when you try to simulate on 2 of the examples simulation will fail and you will get a box that asks if you would like to view the first offending command, click yes then double click on the icon, where it says DataMode add a 0 in the parameter box, then save and run the simulation again and it should be ok.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi jorgen,

Can you post your chart and I or somebody can try and simulate your problem.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Ben,

Tried doing my own chart also but when I add the LED_WS2801 component to the system panel it is nowhere to be seen, component macro says its there but no sign of it.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by LeighM »

Maybe check the Z position property for the component, it could be submerged :?

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Leigh,

I did try that but if I set the property to the same as one of the examples still nothing is visible apart from the marquee:

The example file.
Screenshot 2016-08-26 21.21.14.png
(142.76 KiB) Downloaded 4586 times
my new file.
Screenshot 2016-08-26 21.21.53.png
(125.1 KiB) Downloaded 4586 times
Thanks
Stuart

EDIT Tried adding to 2d Dashboard panel but same thing can't see anything.

EDIT The problem only happens with the WS2801 component, the WS2811 / WS2812 component can be added to system or dashboard window and be seen.
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by jgu1 »

Hi all!

Stuart: concerning att. my program, yes I can do, but it is Ben´s program from the helpmeny, Wiki.

First let me tell my condition. I have two laptop machine Win10 and all Flowcode 3,4,5,6,7installed.

The one machine is for my electronic hobby workshop and only this. On this machine I only have electronic tools, nothing else, and no office.

The second machine I use everywhere have also other programs, including office (Word, exel, ect..).

When I download Bens fcpx file on this machine with office installed the file have a little "word sign" in front look at att. picture.

When I Use my "workmachine" without word intalled, I have ofcource not this wordsign in front. But there I miss some settings in the properties for componentmacro. :?:
The same issue for the NRF0l2 wireless transmitter component.

My question is it necessary to have installed office (word) to use FC7, please. :roll: Not a problem for all other Flowcode version.

Hope this is a little help for further troubleshooting. Hope I'm not too annoying and takes up too much. will only try to help all of us get a super FC. :wink:
Attachments
Picture.png
(48.9 KiB) Downloaded 4555 times

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Jorgen,

No you don't need office installed it is nothing to do with Flowcode, what you have is an association problem, if you right click on the file icon, go down to properties and left click, where it says opens with, you can click on the change button and select Flowcode 7 instead of Word.

hope this helps :D
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by jgu1 »

Hi Stuart!

Thanks.

I Think I my explanation is not good enough. Yes I know this you tell :D

But I think there Migth be another problem on my laptop wich not have office. It doesn't matter how I opened the program, Then I miss some settings in proberties for component. Look in above.

I tryed to reinstall Fc7 severin time without luck.

Br

Jorgen

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Jorgen,

You need to have the component file in the components folder of Flowcode 7, like the picture below:
FC_Directory.png
(143.98 KiB) Downloaded 4520 times
Thanks
Stuart

p.s. your not mithering us, just reply if you want more help, we were all here once :D
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by jgu1 »

Hi again Stuart

Thank you for your kindness, help and care.

I Will look at it this evening, and you hear. :D

Br

Jorgen

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by Benj »

Hi Stuart,
Tried doing my own chart also but when I add the LED_WS2801 component to the system panel it is nowhere to be seen, component macro says its there but no sign of it.
The components both currently have a bug where they don't render properly when you first drag them onto the panel. You have to drag them on, save your project and reload your project. Then they should appear correctly. I am investigating this problem now.
This updated clone matrix component should solve the issue.
clone_matrix.fcpx
(4.61 KiB) Downloaded 306 times

Hi Jorgen,
When I download Bens fcpx file on this machine with office installed the file have a little "word sign" in front look at att. picture.
To add them to your v7 installation simply copy the files into your "Flowcode 7/components" directory.

Fingers crossed this should solve both your current problems.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Ben,

My problem is now fixed after adding the updated clone_matrix.fcpx.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by jgu1 »

Hi Ben & Stuart!

Yes Stuart, My files in the component directory look exactly like yours.. :D

Ben, I guess that the clone_matrix.fcpx should I copy/overwrite in the component lib. in Programmer for FC7. But I still can´t intialize Sorry.: And why does it work on one machine and not on another? :evil:
Attachments
No init.png
(107.86 KiB) Downloaded 4483 times
Error.png
(92.16 KiB) Downloaded 4483 times

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Jorgen,

In the picture that you posted you had the WS2801 and WS2811 files in a directory called C:/FL , they don't go there they go here:

C:/Program Files(x86)/Flowcode7/components

hope this helps
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Ben,
I am trying to simulate a lightning bolt with a strip of 32 WS2801 LEDS, I have done this succsesfully using the Arduino IDE and Fastled, I have tried to do the same in Flowcode but I am strugling with the shiftLED macro, there is nothing in the Wiki about it.

The Arduino code:

Code: Select all

void loop() {
        for(int dot = 0; dot < NUM_LEDS; dot++) { 
            leds[dot] = CRGB( 247, 240, 8);
            FastLED.show();
            // clear this led for the next time around the loop
            leds[dot] = CRGB::Black;
            delay(30);

I think number of leds is defined at the start of the program and an integer called dot is used to shift to the next led with a mathematical function, just not sure how to go about it in FC.

Thanks
Stuart
lighning-strip.fcfx
(7.41 KiB) Downloaded 283 times
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Ben,

This is what I have come up with, not sure if it is right because the simulation is juddery:
lighning-strip-2.fcfx
(7.91 KiB) Downloaded 387 times
Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by Benj »

Hi Stuart,

Looking good. You could also use the shift macro to do the same thing. This will shift your single colour along by one place each time you call the macro.

Here is a slightly tweaked version of the WS2811 component which has a tweaked timing for the T0H timing, now confirmed working on an 16MHz Arduino and the EB091 dsPIC board using the WS2812B LEDs.

Not been able to get this component working on an 8-bit PIC yet even on a 16F1937 maxed out at 32MHz, it's just way too slow for some reason. I'll keep trying.
LED_WS2811.fcpx
(11.42 KiB) Downloaded 318 times

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Ben,

Thanks for the updated component, I haven't bought any of these yet I only have the WS2801, next month maybe.. :D

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by jgu1 »

Hi Stuart!

The FL Directory is only a place where I save my downloaded files. From there I copy/overtwrite these files in the same path as you have done.

The picture I add was only to show the "Wordsign" in front. So I have done it correct, but still an issue and strange for me. :(
Please any other ideas how to solve my problem?

Br

Jorgen.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: WS2801 / WS2811 / WS2812(B) Chainable LED Driver IC

Post by acestu »

Hi Jorgen,

Your computer operating system namely Windows identifies file types by there extension as do applications, sometimes there can be conflicts depending on what applications you have on that particular computer, the fact that you have a word logo before those files means that your computer thinks that they are word files, now because you know that they are Flowcode files you need to change the association from Word to Flowcode, try and follow the pics below:
right_click.png
(72.52 KiB) Downloaded 11832 times
left_click.jpg
(199.33 KiB) Downloaded 4401 times

EDIT I don't have MS Office on my computer so it will look a little different, you could try this link: http://www.thewindowsclub.com/change-fi ... ns-windows

Cheers
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

Post Reply