PWM output with automatic fade

Moderators: Voyager, BertB, rtenklooster, Stuntteam, Martinus

nygma
Normal user
Posts: 18
Joined: 26 Nov 2016, 10:16

PWM output with automatic fade

Postby nygma » 12 Jan 2017, 09:27

Hi All,

I know this has been ask before, but I did not get a clear answer on the topic.
I would like to use ESP Easy to control LED strip using the PWM output of the ESP. Is it possible to set up ESP Easy to automatically fade to a new value instead of setting it immediately on the output?

Regards,
Csongor
mkotek
Normal user
Posts: 116
Joined: 15 Dec 2015, 09:58
Location: Lomianki, Poland
Contact:

Re: PWM output with automatic fade

Postby mkotek » 08 Feb 2017, 08:26

Sure, PWM command has the last parameter, that defines time for fade:
/control?cmd=PWM,<gpio>,<level>,<fade_time>
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
nygma
Normal user
Posts: 18
Joined: 26 Nov 2016, 10:16

Re: PWM output with automatic fade

Postby nygma » 08 Feb 2017, 08:40

mkotek wrote:Sure, PWM command has the last parameter, that defines time for fade:
/control?cmd=PWM,<gpio>,<level>,<fade_time>


Thank you very much, I did not know about this. If I have an RGB strip connected to the ESP, can I just send out 3 messages for the 3 pins to get a color fade?

Csongor
nygma
Normal user
Posts: 18
Joined: 26 Nov 2016, 10:16

Re: PWM output with automatic fade

Postby nygma » 12 Feb 2017, 07:47

mkotek wrote:Sure, PWM command has the last parameter, that defines time for fade:
/control?cmd=PWM,<gpio>,<level>,<fade_time>


I am using this with a long delay know, like /control?cmd=pwm,12,1023,10000. But it seem this command keeps the ESP locked and if I send another pwm command it is not getting executed. Any suggestions?
The ESP is controlling some LED strips and I use this long delay to fade some individual strips in and out. But when I send a pwm,12,0 out, it takes time until the LED goes out. Also how can I use this to control a RGB strip?
nygma
Normal user
Posts: 18
Joined: 26 Nov 2016, 10:16

Re: PWM output with automatic fade

Postby nygma » 22 Feb 2017, 10:45

Hi All,

I am posting this again hopeing somebody reads it and can answer:
I am using the pwm fade with a long delay know, like /control?cmd=pwm,12,1023,10000. But it seem this command keeps the ESP locked and if I send another pwm command it is not getting executed. Any suggestions? Is there a way to tell ESP Easy to stop a current pwm cycle?
The ESP is controlling some LED strips and I use this long delay to fade some individual strips in and out. But when I send a pwm,12,0 out, it takes time until the LED goes out. Also how can I use this to control a RGB strip?
paxi
Normal user
Posts: 53
Joined: 01 Feb 2017, 23:48
Location: Germany

Re: PWM output with automatic fade

Postby paxi » 22 Feb 2017, 15:45

Espeasy is a single threaded system and the fade runs in a simple loop, indeed it can't do anything else until the fade is done.

But there has been something worked out for RGBs, you want to read this:
viewtopic.php?f=6&t=2395&hilit=Rgbw
viewtopic.php?f=2&t=2582
https://github.com/ddtlabs/ESPEasy-Plugin-Lights

Return to “Projects / Applications”

Who is online

Users browsing this forum: AndrewJ and 1 guest