PWM output with automatic fade

Moderators: Voyager, BertB, rtenklooster, Stuntteam, Martinus

Post Reply
Message
Author
nygma
Normal user
Posts: 19
Joined: 26 Nov 2016, 11:16

PWM output with automatic fade

#1 Post by nygma » 12 Jan 2017, 10: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, 10:58
Location: Lomianki, Poland
Contact:

Re: PWM output with automatic fade

#2 Post by mkotek » 08 Feb 2017, 09: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: 19
Joined: 26 Nov 2016, 11:16

Re: PWM output with automatic fade

#3 Post by nygma » 08 Feb 2017, 09: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: 19
Joined: 26 Nov 2016, 11:16

Re: PWM output with automatic fade

#4 Post by nygma » 12 Feb 2017, 08: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: 19
Joined: 26 Nov 2016, 11:16

Re: PWM output with automatic fade

#5 Post by nygma » 22 Feb 2017, 11: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: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: PWM output with automatic fade

#6 Post by paxi » 22 Feb 2017, 16: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

bobbybeans
Normal user
Posts: 103
Joined: 26 Feb 2017, 17:30

Re: PWM output with automatic fade

#7 Post by bobbybeans » 03 Mar 2017, 12:39

what build is this in? I would assume this works with milight plugin? also is there a max time for it in seconds? because I would most likely have this setup for an alarm clock for fade in within 10 minutes

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest