LEDs for board game

Hello, I would like to know if anyone has a solution to my problem. I play a board game “Alien vs pradator the hunt begin”, I plan to 3D print the game and add LEDs. (hardware: Esp8266 d1mini / PC / WS2812B led / power sup +5v).

The game is composed of several rooms (in my example: “room A” “room B” “room C”). each room is independent of the others. I want to put LEDs for each room. I want to be able to tell the ESP: LEDs room A = red, LEDs room C = green, LEDs room B = blue.

  • How do I make my ESP recognize the rooms automatically? knowing that I don’t necessarily have all the rooms in each game AND that they are not always in the same order (see the context “1” and context “2” schemas)

  • Which software to use? (I was thinking of open source stuff “ESP8266-FastLED-IoT-Webserver” but it’s still the same problem as I recognize the rooms?

to say that more simply :

I want to connect (physically / electrically) the room “A”, and lights up with the good color, no matter if the room is connected in 1st or 14th or in the last position in the circuit.

(and the same with the other rooms “B” “C” “XXX”.)

If I’m following you, you should look into “segments,” which allows you to define regions in your strip. You could say led’s 1-20 = segment 1, led’s 21-22 = segment 2, etc. Then Segment 1 = blue, segment 2 = (some effect), etc.

https://kno.wled.ge/features/segments/

I hadn’t thought about the segment, it works but not exactly as I would like and it’s not practical. The problem with the segments is that I have to put each “room” in a specific order for it work and it takes time.

I want to connect (physically) the room “A”, and lights up with the good color, no matter if the room is connected in 1st or 14th or in the last position in the circuit.

how to make wled automatically identify a segment? a chip, a card on each room?

I don’t believe there is a way for wled to automatically detect anything, including how many led’s are connected or what type of leds are connected, so I doubt it would be able to auto detect segments. I don’t think there is a quick/easy way to accomplish what you’re after because it’s a bit beyond the majority of use cases. WLED does a lot of things I’m unaware of though, so hopefully someone has better ideas.

I can use another software…

but my number one problem at the moment is how to identify my “rooms / my different groups of LEDs”.

assumption : it would take some kind of chips / card to put in each room to be able to identify it and define the color of the LEDs in it… and an ESP which “controls” them all.

Have you thought about potentially having 1 ESP per room, which would “define” the room, and then control all instances? There’s a lot of automation and scripting you can do by adding each instance of WLED to Home Assistant, which would probably be easier for coding the actual game once you have your “rooms” defined. You can add logic like “if x happens, make room 1 red, room 2 blinking blue,” etc. Just throwing ideas out. Don’t know how practical they are.