corbanmailloux / esp-mqtt-rgb-led

MQTT RGB LEDs Using JSON for Home Assistant
MIT License
270 stars 74 forks source link

Add pulse mode #28

Open r41d opened 7 years ago

r41d commented 7 years ago

Pulse mode transitions forth and back between black and the current color. Looking for remarks before possibly adapting it for the other 2 sketches.

corbanmailloux commented 6 years ago

Can you clarify what exactly the pulse mode does? If it's just toggling between the already set color and black, I think you could achieve the same thing by using the existing flash effect and uncommenting this line. I'm all for adding more effects, I just want to make sure that they make sense.

depuits commented 6 years ago

the difference between this pulse and the flash effect seems to be that the flash only flashes a specified amount of times while this pulse would keep on flashing until stopped.

This could be implemented in the flash effect using 0 as flash length or by adding another option to start it indefinitely. I'm not sure if and how you could pass effect parameters in HA however.

r41d commented 6 years ago

Flash does 0-255-0-255-0 in a specified interval Pulse does 0-1-2-3-4-5-...-255-254-253-252-...-0

depuits commented 6 years ago

So do we also need a flash effect that pulses indefinitely?

r41d commented 6 years ago

TODO: adapt to the new unified sketch