Turn on leds one by one (like wipe, but keep them on)

Hello, I am pretty new to WLED and just implemented it in HASSIO using the integration. Really like the amount of effects, reliability and speed!

I have got a led strip of 468 leds between both my stairs. The strip is behind the stair railing.
When movement is detected, I would like to turn the leds on one by one starting from downstairs all the way to the attic. Like the wipe effect, but than keep them on when they are all turned on. Is there a way to set the effect like this without modifying the WLED code?

As a bonus, I would also like the following. When movement is detected on the first floor I like to turn the part of the strip from the stair between ground floor and first floor on from top to bottom. The part of the strip from the stair between the first floor and second floor should turn on from bottom to top. I believe I should be able to use segmentats for that.

Take a look at the github project files, specifically the usermods section, and see the wipe basic meant for exactly the situation you describe.
You will need to integrate that usermod into WLED and build the firmware. If others have already done it, they may make it available to you if you cannot build it yourself.

1 Like

Wow thank you for your fast reply! I gonna take a look at that. Building the firmware is totally new for me though. I gonna give it a try :slight_smile:

1 Like

Indeed this project looks exactly like what I would like to achieve. Thanks for your advice.

I have googled around to look how to build my own firmare. To be honest I have no idea what to do or what I am doing. :sweat_smile:

I have done the following in Arduino IDE so far:

  1. Install the ESP8266 board manager.
  2. Selected the NodeMCU 1.0 (ESP 12-E Module). I use the NodeMCUv2 and am succesfully running Wled on this default Binary: WLED_0.x.x_ESP8266.bin;
  3. Copied the code in ‘wled06_usermod.ino’ from the stairway_wipe_basic into ‘usermod.ccp’.
  4. Tried compiling.
  5. Received error ‘ESPAsyncTCP.h: No such file or directory’.

Would be great to receive any assistance on this. I would really like to learn how to do this, but I have no experience with Arduino IDE.

In that case, get rid of the Arduino IDE (at least temporarily). Instead, install Visual Studio Code, and follow online guidance for integrating PlatformIO into VS Code for use with Arduino.

Don’t install ANY library in VS Code or platformIO.
Then point VS Code/Platform IO at your clone / fork of WLED, and you can copy in the usermod file from its folder into the main folder where the empty usermod file is.
Then you follow more online guidance for compiling your first PlatformIO project for arduino / ESP8266.
It will be so much easier.
Also, there are probably easier ways to do the above steps, but that’s what worked for me.

I’ve gotten to the point of installing everything, loading the code, but not found how to select the board yet.

The internet is filled with examples of how to open an existing platformio arduino project, compile, build, and deploy to esp8266/esp32. Both html (blogs/web pages), and video (youtube and such).

Everything I’ve found so far all starts from scratch.

Let’s say you accept all the default settings when installing VS Code & Platform IO’s IDE.
Now you have a default folder associated with PlatformIO projects.
Copy the WLED clone/fork to that folder.
Now pretend you are about to compile Tasmota, and watch this: https://www.youtube.com/watch?v=Sz2zc_0PdiY
Starting around 15-20 minutes in is where the magic happens.

2 Likes

I’m going to split this out of this thread. Sorry OP.

I have succesfully built the default master branch and uploaded it to a NodeMCU v2. Thank you for your advice and the youtube link!

However, I am not able to use the usermod stairway_basic_wipe. The file in it is a .ino file which causes ‘40 problems’. Do you have any advice on that?

Ok, so I copied the content of the .ino file into usermod.cpp and the errors disappeared. Also I followed these instructions: https://docs.platformio.org/en/latest/faq.html#convert-arduino-file-to-c-manually

The file project compiled succesfully and I have even succesfully loaded the firmware over the air on a fresh NodeMCU using the Default WLed I just installed on it. So, it looks like I’m almost there.

The usermod’s descriptions is the following: Use userVar0 and userVar1 (API calls &U0=,&U1=, uint16_t)

So I have called the following /win&U1=, nothing happens. When i try /win&T=1 for example it turns on, win&T=0 makes the strip turns of. So the API should be working. Might there be a problem with my usermod?

Just to answer my own question… I have to use command as follows: /win&U0=1. Works like a charm!

Thanks a lot for your help!

1 Like

I am so glad you got it to work for you :smile:

1 Like