Neopixel Basic P038 Multiple instances

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Neopixel Basic P038 Multiple instances

#1 Post by HomeJCL » 10 Jan 2022, 18:00

Subject sums it all.

Is it possible to have multiple NeoPixel Basics plugins running ?

I have access to both of the strips but only with 1 instance in Devices.
At time, it is one or the other.
Not that it is crucial.

Thanks
Belgium and land of ESP ... counting :D


HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Re: Neopixel Basic P038 Multiple instances

#3 Post by HomeJCL » 10 Jan 2022, 19:22

Thanks

Need to up my configuration skills in the meantime :lol:
Belgium and land of ESP ... counting :D

User avatar
Ath
Normal user
Posts: 4157
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Neopixel Basic P038 Multiple instances

#4 Post by Ath » 11 Jan 2022, 20:18

I've created a pull request #3909 to add multi-instance as a feature for the NeoPixel (Basic) plugin (P038).

Most likely the Github action builds won't complete, what .bin file are you using?, then I'll upload that build here.
/Ton (PayPal.me)

HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Re: Neopixel Basic P038 Multiple instances

#5 Post by HomeJCL » 11 Jan 2022, 21:48

Tried all of them, standard would be ESP_Easy_mega_20211224_normal_ESP32_4M316k

Thanks
Belgium and land of ESP ... counting :D

User avatar
Ath
Normal user
Posts: 4157
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Neopixel Basic P038 Multiple instances

#6 Post by Ath » 11 Jan 2022, 23:22

A local build for PR #3909, that should allow multiple NeoPixel (Basic) tasks to be configured and controlled separately:
ESP_Easy_mega_20220111_normal_ESP32_4M316k.zip
(1.84 MiB) Downloaded 255 times
/Ton (PayPal.me)

HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Re: Neopixel Basic P038 Multiple instances

#7 Post by HomeJCL » 12 Jan 2022, 08:24

Hi

It works … when you address the right one :roll:

Many thanks.

Can make time for the application now. Hopefully my part goes as slick as your support :lol:

For the record https://espeasy.readthedocs.io/en/late ... f-a-plugin
Belgium and land of ESP ... counting :D

User avatar
Ath
Normal user
Posts: 4157
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Neopixel Basic P038 Multiple instances

#8 Post by Ath » 12 Jan 2022, 08:57

Thanks for testing, and the confirmation :)
/Ton (PayPal.me)

HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Re: Neopixel Basic P038 Multiple instances

#9 Post by HomeJCL » 12 Jan 2022, 19:40

Does this means standard implementation in future releases ?

Thanks again.

The Mrs asked for other stuff.

Technology when it works : goes from pfff superfluous to can you also do this :D
Belgium and land of ESP ... counting :D

User avatar
Ath
Normal user
Posts: 4157
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Neopixel Basic P038 Multiple instances

#10 Post by Ath » 12 Jan 2022, 19:58

Yes, this is one of the plugins in the NORMAL builds, so it will be in nearly all available builds once it is merged and released (well, 'max', 'normal' and 'test' that is, the minimal and hardware specific builds don't have this plugin included).
/Ton (PayPal.me)

HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Re: Neopixel Basic P038 Multiple instances

#11 Post by HomeJCL » 02 Mar 2023, 18:45

Just tried to update an old setup.

Seems P038 multiple instances is no longer "working" in release after 20220427.

I have tried, I think all of them, after this release date, but no success.

Can you confirm ?

Thanks
Belgium and land of ESP ... counting :D

User avatar
Ath
Normal user
Posts: 4157
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Neopixel Basic P038 Multiple instances

#12 Post by Ath » 02 Mar 2023, 19:00

There is no reason for that, has been tested recently here, so should work fine.
/Ton (PayPal.me)

HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Re: Neopixel Basic P038 Multiple instances

#13 Post by HomeJCL » 13 Mar 2023, 19:15

Hi Erased and Erased more, pushed an “empty” file … and succes

Sorry for late reply, ESP is a testbed for a lot of things and for some reason I tested another platform, which left crumbles to make me think ESPEasy was the solution.

Mae culpa …

I believe again and even more :D ESPEasy is alive again
Belgium and land of ESP ... counting :D

alborland
New user
Posts: 3
Joined: 01 Feb 2025, 21:34

Re: Neopixel Basic P038 Multiple instances

#14 Post by alborland » 01 Feb 2025, 21:43

Hi,
found this post in 2025, trying to use either Neopixel (Basic) or Neopixel (BusFx) on two different GPIO's.
Testing LEDs on one single task enabled is ok.
Two enabled tasks works only for the first.

Firmware is ESP_Easy_mega_20241222_neopixel_ESP32_4M316k
Any idea ? (Does it only work on "normal" builds?)

TD-er
Core team member
Posts: 9587
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Neopixel Basic P038 Multiple instances

#15 Post by TD-er » 01 Feb 2025, 21:58

Current implementation is using RMT and you only have a very limited amount of RMT channels.
There is work being done to make addressable leds a bit more flexible (using either SPI/I2S/UART), but that's not available yet.
So for now you only can use 1 addressable LED string in ESPEasy.

alborland
New user
Posts: 3
Joined: 01 Feb 2025, 21:34

Re: Neopixel Basic P038 Multiple instances

#16 Post by alborland » 02 Feb 2025, 17:28

Tested today with build from #6.
This is working (commands like 1.neopixel,4,0,0,150 and 2.neopixel,4,0,150,0 are send to different GPIO)
@ath:Is this a custom build?
if yes, how do i manage it to get it running with current version?

Would like to have this for BusFX too, but this is not in included in "normal" build.
Attachments
test.PNG
test.PNG (36.29 KiB) Viewed 5628 times

User avatar
Ath
Normal user
Posts: 4157
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Neopixel Basic P038 Multiple instances

#17 Post by Ath » 02 Feb 2025, 19:33

alborland wrote: 02 Feb 2025, 17:28 Tested today with build from #6.
This is working (commands like 1.neopixel,4,0,0,150 and 2.neopixel,4,0,150,0 are send to different GPIO)
@ath:Is this a custom build?
if yes, how do i manage it to get it running with current version?
It's a build from the pull request code or 3 years ago, that has been merged not too long after that build was made. So quite old, but it should still work.
The "official" way of addressing specific tasks is to prefix the task name (neo1, neo2) to the command, using a dot as the separator. But you can also use the task number (1, 2), though that's not actively promoted, as when using the task name it's much more visible where the command is supposed to go, and portable when reconfiguring the tasks.
alborland wrote: 02 Feb 2025, 17:28 Would like to have this for BusFX too, but this is not in included in "normal" build.
There are a couple of NeoPixel builds (you should use the ESP32 build, without any type-suffix, so not ESP32-S3, etc.) that have all NeoPixel plugins combined, as it wouldn't fit combined with the Normal plugin set. As an alternative, you can get an ESP32 with 8MB or 16MB Flash, and install a MAX build, that has all plugins, and 99.9% of features, included. 8MB Flash and 16MB Flash to support the MAX builds is available on ESP32 (a.k.a. Classic), ESP32-S3 and ESP32-C6.
/Ton (PayPal.me)

alborland
New user
Posts: 3
Joined: 01 Feb 2025, 21:34

Re: Neopixel Basic P038 Multiple instances

#18 Post by alborland » 03 Feb 2025, 18:21

Tnx for the fast reply,

I used both types of commands 2.Neopixel... and neo2.Neopixel... for testing, i think that is not the problem.

As i mentioned in #14: i used the neopixel build ESP_Easy_mega_20241222_neopixel_ESP32_4M316k but it doesnt work on the same ESP
only the build from your post #6 does.

@TD-er: why do you think i can only adress 1 port? (since there was this request done https://github.com/letscontrolit/ESPEasy/pull/3909)

i don't really understand what HomeJCL did to get it working.

User avatar
Ath
Normal user
Posts: 4157
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Neopixel Basic P038 Multiple instances

#19 Post by Ath » 03 Feb 2025, 21:11

TD-er explained that newer builds use RMT for steering the LEDs, and not all ESP32 models have multiple RMT channels available. To similarly use multiple GPIO pins with LEDs won't be possible with only a single RMT channel.

As an alternative, you can use a single GPIO to control all LEDs (I've used over 500 LEDs on a single GPIO, so the number shouldn't be an issue, how many LEDs are to be connected?), and use an offset to control the part that's now on the second GPIO. The plugin does support that.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9587
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Neopixel Basic P038 Multiple instances

#20 Post by TD-er » 03 Feb 2025, 21:28

When updating the code to work with Arduino 3.0/ESP-IDF 5.1 I had to get things working as quite a lot of libraries were not yet updated to use those new SDKs.
(well actually, none were, as I was working on the migration before Arduino 3.0/ESP-IDF5.1 was released)

One of the major changes which broke a lot of existing code was direct GPIO access.
This had become about a factor 1000x slower.
Moving the code to only use RMT required the least amount of changes, so that's what I did.

There is some code pending to use addressable LEDs via I2S, SPI or UART.
But I simply didn't have the time yet to implement it for ESPEasy.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest