GLCD Display Manager Overhaul

For general Flowcode discussion that does not belong in the other sections.
BenR
Matrix Staff
Posts: 2122
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 563 times
Been thanked: 749 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Hello,

I may now have fixed the WS2812B component, it seems to be compiling and outputting signals so that's promising.

I haven't confirmed with the LEDs just yet as I'm remote desktop and can't see if the LED is lighting or not ;) I'll confirm tomorrow.

BenR
Matrix Staff
Posts: 2122
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 563 times
Been thanked: 749 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Ok it looks like the WS2812B is now working, but only if you only have up to 2 of the LEDs connected. Any more and there is a gap in the transmission that is long enough to break the data chain.

I'm on it and will hopefully be able to solve this soon.

BenR
Matrix Staff
Posts: 2122
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 563 times
Been thanked: 749 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Right now working on the WS2812B, note I have tested using an ESP32S3 and 6 LEDs with a rainbow effect to ensure no corruption in the output.

The code should hopefully now allow an arbitrary number of LEDs and also hopefully work on any ESP32 but let me know if you come across any issues.

I pass the LED data two LEDs at a time to the RMT peripheral on the ESP and this handles the output and I used to wait for the TX complete flag to return true before passing in the next pair of data but this is now several hundreds of microseconds after transmission ends and so cannot be relied upon anymore. So I've reverted to a fixed delay which is working well in this instance but we shall see.

jgu1
Posts: 898
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 791 times
Been thanked: 197 times

Flowcode v11 Re: GLCD Display Manager Overhaul

Post by jgu1 »

Hi Ben!

I have made test. Full update. No changes for me. I use the ESP32 S3 DEV board. I use the pin 48 which is connected to the onboard WS2812 Led.
No data is comming out of pin 48.
When I add the WS2812 the "led" shown as in the picture on the 2D screen. Maybe I have overseen something. :?:

Br Jorgen
Attachments
WS2812.png
WS2812.png (145.78 KiB) Viewed 1906 times
WS2812_S3_Test.fcfx
(9.61 KiB) Downloaded 145 times

jgu1
Posts: 898
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 791 times
Been thanked: 197 times

Flowcode v11 Re: GLCD Display Manager Overhaul

Post by jgu1 »

Hi Ben!

Have you had time to look into the WS28xx component? As you can see, in FC11 the LEDs do not resemble the actual LEDs as intended. In FC10 they are displayed correctly in the 3D panel, whereas in FC11 they are shown in the 2D panel, appear as square, and do not work in the simulation.
I test with the ESP32 s3 dev board, the led on the pcb.
Thank you in advance. ;)

Br Jorgen

BenR
Matrix Staff
Posts: 2122
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 563 times
Been thanked: 749 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Hi Jorgen,

Just checking but have you done a full database update, it could be something underlying like the clone matrix is missing.

The latest version of the component should be able to be added to both the 3D panel and the 2D panel. You should be able to right click the component on the toolbar and choose where it is added.

As a check can you click on View -> Component Debugger and then check the Expose Full Component tree.

In the properties pane your tree should look like this.

PropTree1.jpg
PropTree1.jpg (19.54 KiB) Viewed 1161 times
Also check that the clone_matrix_2d has properties that look like this.

PropTree2.jpg
PropTree2.jpg (31.54 KiB) Viewed 1161 times

This is what I'm seeing so be useful to find out what's different for you.

Full.jpg
Full.jpg (48.96 KiB) Viewed 1159 times

jgu1
Posts: 898
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 791 times
Been thanked: 197 times

Re: GLCD Display Manager Overhaul

Post by jgu1 »

Thank you!

Full update, always :)

I follow your guide and the setting look equal.

After I have restart FC I could see the Led on 2d and I can simulale, but not working in ESP32 s3 HW. If I add a new WS28xx ,they are squared again.

In the Proporties, hsndle the component name is WS23111.

Jorgen
Attachments
ws.png
ws.png (197.47 KiB) Viewed 1147 times

BenR
Matrix Staff
Posts: 2122
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 563 times
Been thanked: 749 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Hello,

Please can you check the LED component pin connection property has the "Use Chip References" ticked. I think currently without it ticked it may be causing issues working out which pin to use.

I'll investigate and see if we can get it to work in the GPIO mode too.

jgu1
Posts: 898
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 791 times
Been thanked: 197 times

Re: GLCD Display Manager Overhaul

Post by jgu1 »

Hi Ben!

I have tested both, guess it was this you mean :) But no ligth in the led.

Jorgen
Attachments
Flowcode1.fcfx
(13.25 KiB) Downloaded 40 times
SPORTB.16.png
SPORTB.16.png (185.77 KiB) Viewed 1001 times
SGPIO48.png
SGPIO48.png (194.57 KiB) Viewed 1001 times

BenR
Matrix Staff
Posts: 2122
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 563 times
Been thanked: 749 times

Re: GLCD Display Manager Overhaul

Post by BenR »

Hi Jorgen,

I've just tried this and it is working for me. But there is a problem in that the initialise and the refresh are so close together in the project that they end up being part of the same data chain. If you only have one or two LEDs connected then they would simply appear as off, with the 3rd and 4th being set to red.

If you add say a 1ms delay before calling refresh then hopefully you now find that that's a long enough delay to allow the LED to work as intended. 60us is enough for the sync pulse and currently using your program as is there is only 40us between the initialise refresh and the main refresh.

Hopefully this is all the problem is and otherwise it's working well.

I've also tried your project with use chip references unticked and can confirm that this is not working so I'll see if I can resolve this now.

Post Reply