ESP32 and component LED_SK6812RGBW2

Any bugs you encounter with Flowcode should be discussed here.
stefan.erni
Valued Contributor
Posts: 758
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

ESP32 and component LED_SK6812RGBW2

Post by stefan.erni »

Hi Ben

If I use component LED_SK6812RGBW2 on the 2D Panel or 3D Panel on a ESP32S

the ESP32 gives fail while compile.
[2/6] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/esp-project.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/esp-project.c.obj


regards

Stefan

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ESP32 and component LED_SK6812RGBW2

Post by BenR »

Hi Stefan,

Please can you attached the .msg.txt file and I'll investigate for you.

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: ESP32 and component LED_SK6812RGBW2

Post by stefan.erni »

Hi Ben

In FC9 it's working but in FC10 not yet


regards

Stefan
Attachments
FC10_Fire_ESP32_IMU_tis1.msg.txt
(62.72 KiB) Downloaded 123 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ESP32 and component LED_SK6812RGBW2

Post by BenR »

Thanks Stefan,

I've pushed an update for you that will hopefully solve the problem.

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: ESP32 and component LED_SK6812RGBW2

Post by stefan.erni »

Hi Ben

Now it's working in FC10 also. Litle problem are in FC9 and FC10 about color.

I testet a litle more and in the simulation it's working fine to set the leds and color.

In the hardware with the ESP32 I can set all to white or off.

But to set RGBW to the Leds is like a mixed mode off color and LED's.

maybe can test a little more.

regards

Stefan

Simulation perfect!
Snag_f84d10.png
Snag_f84d10.png (27.42 KiB) Viewed 2972 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ESP32 and component LED_SK6812RGBW2

Post by BenR »

Hi Stefan,

If you can work out what's going wrong that might help. I think I have some of these LEDs somewhere so I'll try and replicate too.

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: ESP32 and component LED_SK6812RGBW2

Post by stefan.erni »

Hi Ben

Now it's working in FC10 also.
Unfortunately not. The LEDs were still lit from the FC9 program. The LED does not work in the FC10 yet.

In the FC9 I tried to test all LEDs and colors but there is no connection that I can see. On my device, the LEDs are behind plexiglass and are therefore difficult to see which LED lights up and how. I'm going to get a strip too. Then it will be easier (maybe).

regards

Stefan

Strip I get :
Snag_cbc632.png
Snag_cbc632.png (639.89 KiB) Viewed 2959 times

mnfisher
Valued Contributor
Posts: 956
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 509 times

Re: ESP32 and component LED_SK6812RGBW2

Post by mnfisher »

Use of the RMT functionality of the RMT functions is very interesting...

I tested a strip of these with an esp32 - and after a SetAllLeds(color) - Refresh - I get a multicolour strip (the strip I have is 120 LEDs in 60 pairs) - and I notice that 'pairs' are identical - but the colours of the pairs seem to be 'random'. I'll have a play with the oscilloscope and see if I can see what's happening here.

Yesterday (having misread the post badly) - I had a play with the ws2812 library - and output looks okay (also RMT and timings match the specs very nicely) - but with a 14us 'gap' after each pair of LEDs (a consequence of writing 48 bits of data (a pair of LEDs) using a 64 bit buffer?) - and one idea is that the 4us 'wait' (rather that waiting while the RMT transmit is busy) is causing an issue?

Martin

mnfisher
Valued Contributor
Posts: 956
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 509 times

Re: ESP32 and component LED_SK6812RGBW2

Post by mnfisher »

After a bit of fiddling - I got the LEDs to work...
So my strip seems to be GRB rather than RGBW - and the LEDs addressed in pairs (so 60 pairs length rather than 120 individually addressed)

I created an 'experimental' program than lets the user choose data format and bits per pixel. LEDs now glowing happily :-)

Note that it stores the pixel data as a long word in the order to send (MSB first) - so calculates the colour according to RGB order. I don't have an RGBW strip to test - so maybe someone could try (SetAllPixels might need a tweak, and set properties)
sk6812.fcfx
(22.41 KiB) Downloaded 138 times

Martin

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: ESP32 and component LED_SK6812RGBW2

Post by stefan.erni »

Hi Ben, Hi Martin

With the code abstract layer from Martin the Les Strip is working.
Is it possible that the component from flowcode also works?

regards

Stefan

Post Reply