Hi All
Hope you can assist me here.
I have a rule that monitor a pin, when the pin goes low(0), i switch a spesific NeoPixel on and when the pin goes high(1) i switch the NeoPixel off.
This works, what i am trying to understand is how can i make the NeoPixel "Strobe / Flash" while it is on?
This is the rule i have at the moment:
On Right#State=0 do
NeoPixel,2,255,128,0
endon
On Right#State=1 do
NeoPixel,2,0,0,0
endon
Strobe / flash NeoPixel in Rules
Moderators: grovkillen, Stuntteam, TD-er
Re: Strobe / flash NeoPixel in Rules
You can have a look at the loopTimerSet commands: https://espeasy.readthedocs.io/en/lates ... oop-timers
I guess the most simple way is to use a variable to keep track of the state of the LED and then in such a loop timer you flip the state of this variable and write it to the NeoPixel LED.
I guess the most simple way is to use a variable to keep track of the state of the LED and then in such a loop timer you flip the state of this variable and write it to the NeoPixel LED.
Code: Select all
On Right#State=0 do
loopTimerSet_ms,1,500
let,1,0
endon
On Right#State=1 do
loopTimerSet_ms,1,0
endon
On Rules#Timer=1 do
if var#1 = 0
let,1,1
NeoPixel,2,255,128,0
else
let,1,0
NeoPixel,2,0,0,0
endif
endon
-
- Normal user
- Posts: 125
- Joined: 28 Feb 2018, 07:40
- Location: Melbourne, Australia
Re: Strobe / flash NeoPixel in Rules
I was looking for a similar solution. I was just thinking if there is a display panel with 8 to 10 NeoPixels then it is going to become complex very quickly.
Thanks for the example.
Thanks for the example.
Friends with kangaroos and some time koala rescuer.
Who is online
Users browsing this forum: No registered users and 31 guests