Hello guys,
I have an arduino vith attached one neopixel adafruit RGB led.
Is possible to write a rule to create some colors animation?
I’d try that one but doesn’t work
Rule:
rule "Neopixel Light Animation TEST"
when
Item Neopixel_Animation changed
then
var i = 0
while((i=i+1) == 255) {
val redValue = (256-i).toString
val greenValue = (256/i).toString
val blueValue = (i).toString
val color = redValue + "," + greenValue + "," + blueValue
sendCommand(Neopixel_Int_Colore, color)
Thread::sleep(400)
}
end
Items
String Neopixel_Int_Colore {mqtt=">[mosquitto:Int/L/RGB_1_in/RGB:state:*:default]"}
Number Neopixel_Animation "Effetti Luminosi" <rgb> {mqtt=">[mosquitto:Int/L/RGB_1_in/A:command:*:default]"}`
Sitemap
Selection item=Neopixel_Animation mappings=[0=OFF, 1=Animation]
Thanks in advance