Page 1 of 1

Controlling LEDs with Boolean functions

Posted: Sat Feb 05, 2022 6:10
by gregd99
I *think* that I have a boolean function set up correctly and associated with physical cell 49.

I would like to use the output of the function to control a LED.

Although the manual lists "boolean function" as an event for LED control.... this option is not in the software drop down list.

I have tried using the cell in which the boolean function resides as a physical/logical/virtual button event to set the LED. I have also tried to set a button as the output of the boolean function and use this as a physical/logical/virtual button event to set the LED.

Does anyone have any experience with this?
Thanks very much.

Re: Controlling LEDs with Boolean functions

Posted: Sat Feb 05, 2022 11:59
by Ron61
Show off your button settings and Leds settings. Without this, it is difficult to understand where the error is.

Re: Controlling LEDs with Boolean functions

Posted: Sun Feb 06, 2022 1:28
by Crosius
Yes, I have experience with this.

First check your firmware version. There is a bug in the v2.9 firmware that causes some of the boolean function blocks to ignore inputs. This can cause them to return unexpected results or not trigger correctly in response to the input they receive.

The most recent firmware that appears to have all boolean functions working properly is 2.08.5

Then if your setup still doesn't work post your boolean and LED events.

Re: Controlling LEDs with Boolean functions

Posted: Tue Feb 08, 2022 21:21
by Victorus
My example. On-Off-On toggle switch. Line 22 mapped to keystroke G (gear down). Line 21 mapped to keystroke Shift+G (gear up). LED 11 will indicate that gear dn. ! Toggle must be in off - not to flood keyboard buffer. RS trigger.
RST.png

Line 22 "presses" line 5. It stays On after 22 is off. LED # 11 flashes.

led.jpg

Line 22 "releases" line 5. LED is off.

Re: Controlling LEDs with Boolean functions

Posted: Wed Mar 09, 2022 17:53
by lawndart
This is not a boolean function solution, but an equivalent button "OR" to control an LED is to use the "Use 2 buttons" option in Buttons/Logical Layer/Profile. For the second button, assign an unused button such as 125, 126, or 127.

Under External/LEDs/Global, assign an EVENT to Logical Button with OP1 set to the second button (ie. 127). Also set the LED (RGB #10 in my case), the LED MODE and Color1.

In my case with the NXT/SEM combo, 32 LED events was not enough for all the buttons. However I was using up to 7 switches for trims (rudder, ailerons, elevator, reset trims). So assigning these buttons to use the same color on a secondary logical button was a good solution to get an LED event on all buttons.

Clipboard01.png