Wled strobe

Hi, I’m trying to make a diy Novatrope [How Does It Work | NovaTropes] and I would like to control the LEDs with Wled, but in order for the illusion to work, the lights need to strobe on and off at around 40 Hz. I am going to connect the motor to the relay pin that Wled uses so it will start spinning when the lights turn on. I was thinking of adding a rotary encoder to tune the frequency of the LEDs, and I was wondering how I could add that to the code, and If I could possibly change the frequency in the web interface.

Thanks for the help

Hi Marc, I currently trying exactly the same with the “Blink” effect of WLED with 255 as Effect Speed and 0-5 for Effect intensity. It works with a relatively slow rotation but looks not so nice (blury). Did you make a progress or did you found an alternative for WLED? Best regards, Dirk

Maximum strobe frequency with WLED would be 21Hz since WLED operates at 42 FPS (1 frame on, 1 frame off).

@blazoncek thank you for the information … but is the any way to increase the frequency?

Yes, by changing the source & custom compiling.
But do not expect magic things, 60 FPS should be the limit.

1 Like

@blazoncek Ok, I am not sure how to do that. 60 fps would be good enough. Are you able (from time perspective) to do such a change in the source and could compile it for me? A other problem are the steps of effect speed. From 0-252 is is a slow blinking and 253-255 is only fast blinking. It would be great it the range would be more linear. I would “donate” for a box of beer if someone could do that for me.

Unfortunately I don’t do that. It can quickly become a neverending story.

But don’t despair. All you need to do is get Visual Studio Code and istall it on your computer, then install PlatformIO extension in VSC, clone WLED repository (or download ZIP) and hit compile button.
There are several YouTube videos on how to do that.

To get 60 FPS you’ll need to change the FX.h file by replacing 42 with 60 in the line containing #define WLED_FPS.


Thank you very much for the information. This was what I want to know. I fully understand your point and will try to do it by my self. If feedback is welcome I can show the result (of Zoetrope) if I was successful.

@blazoncek I did the recompilation successfully and with the test.htm page I have checked the fps and it shows now 60 fps on the page (before 40 fps). Thank you very much again. Maybe you could also give me an advice how I can “strech” the effect speed. Currently from 0-253 the blink effect speed is very slow and only 254 and 255 is fast blinking. How can I make it more linear so e.g. 128 would be 30 fps and 255 would be 60 fps? In addition I have the feeling that duty cycle is not really working with high frequency but this could be also my problem that I am not able the see the difference from 0 to 255 effect intensity. At lower fps I see the effect of duty cycle but not at 40 or 60 fps.

You will need to modify FX.cpp. Find blink() function and play.