Repository navigation
Question about blinking an LED #24392
Replies: 5 comments 10 replies
|
So as it seems (according to more reading and Gemini), the way to deal with this was something like these rules, which use an additional RuleTimer to reset the variable after the blink times out, calculated somehow like: given So taking these values, we have to wait for 5 seconds to trigger resetting the variable, but likely we can spare an extra second to make sure it is executed after finishing. So the solution could be something like did not test it, but does that make sense? I was thinking about writing a berry script to do this, but I think that the problem remains the same, right? I can hook into triggers like any thoughts? |
|
Standard rule mechanisms should handle
Of course, you can set a much higher In Berry, you can easily have a function to blink until canceled, without needing restarts: |
|
Thx for clarification...
Well, usually I come from the Berry side asking weird questions, to be pointed to a one-liner rule doing the job elegantly :-) |
|
Right... ok, now I tried to implement things in Berry, but I found some "surprising" aspects there. I just have two buttons and two relays, so in order to act upon a button press, I wrote a berry script with a simple setup: I think I need to decouple the standard behaviour of Button-Relays with some SetOption (don't remember). Anyway, what happens is this: If I press Button 1 it is 256 and if I press Button 2 it is 257, but why is there no |
|
Ok, I need to pick this up again for a special reason. I'm using this piece of hardware: The driver for blinking a led which actually triggers the MOSFET works perfectly (connected as Relays on GPIO16 and GPIO17 for the dual one). But say you want to put the device into sleep mode with ULP. What happens is that the respective GPIOs go to "on" mode, which means that while the ESP goes to sleep, the LEDs turn on. I have this script which I took from some examples and use regularly for ULP business: Is there a way to prevent this by doing some |

Uh oh!
There was an error while loading. Please reload this page.
I've used some rule code to implement a blinking LED triggered by a button, which can be interrupted with another button press. The problem is that the rule does not work if there is no interruption but the blinkcount is simply reached:
If
blinkcountis reached, it stops, but thevar1is obviously not reset to0.I was not able to define a rule using
Power#stateto reset it once the{"POWER1":"Blink OFF"}message appears.Is there a particular trigger called instead of
#state? Something like#blinkoff?All reactions