#I'd like to have an LED flash when the gear moves up od down. But how?

1 messages · Page 1 of 1 (latest)

cyan nymph
#

Each modifier result changes the current value of the config ($).
So after the first comparison, both values, either 0 or 1, are less than 95, resulting in the second comparison always being true.

#

You need to combine the two conditions into one

#

Personally, I much prefer if rather than the comparison

#

So try if($>5 and $<95,1,0)

#

Instead of the two comparisons

frail violet
#

@cyan nymph I've tried it now, but unfortunately it doesn't work 100%.

From up to down, the red LED flashes, and at the end, it turns green. So that's fine.
From down to up, the green LED goes out and the red LED flashes. So far so good.
But at the end, the red LED starts flickering. Not good... I had exactly the same problem with my original setup...

Honestly, I expected it to work with your solution. Maybe there's something wrong somewhere...

I tried two different syntaxes:
if($ > 5 && $ < 95, 1, 0)
if($>5 and $<95,1,0)

It seems there's a conflict in the range from >0 to <5.
But the final value indicates it's correct...

The screenshot shows the end of the up situation. Gear-Up is 1, Gear-Move is 0. So that's correct...

cyan nymph
#

Don't use any preconditions

frail violet
#

@cyan nymph But where should I put a formula like if($ > 5 && $ < 95, 1, 0)?

cyan nymph
#

It is the modifier for the output config for the gear in transit light.

#

Did you specify any precondition?

frail violet
#

Nope

cyan nymph
#

Please specify your hardware for this? How many leds? Which colors? Usually gear completely up is with leds off. In transit with red leds on, completely extended green leds on, red leds off.

#

Flickering is invariably two configs with opposing status fighting to display on the same led.

frail violet
#

I have one RGB LED. I use red pin for Gear Up and green pin for Gear Down. I also want the red LED to blink during transit.

But I already see what's causing the problem.
I use one red LED, which I want to blink during transit and light when the gear is folded.

When the gear is up, the blink routine tells it to turn off, and the Gear Up tells it to turn on. The result is flickering.
This way, I can't get it to work...

If there's no other solution, I'll just have to forget about the flashing...

#

This is the route I'm going to take now.
"Usually, gear completely up is with the LEDs off. In transit with red LEDs on, completely extended green LEDs on, red LEDs off."

I also think that's easier to set up.
Thanks.