Page 1 of 1

Toggle LED with multiple buttons

Posted: Sun Mar 13, 2022 23:48
by verilyzed
Hello,

Im new to the community. I got myself two NXT Gladiator Standard and wanted to customize the LEDs.

I want an idle state, where the top RGB LED is blue. But when I press button 4 i want it to be green. If i would press it again it should be blue again. Then if I press 3 regardless if i pressed 4 before I want the LED to turn red. And when i press 3 again it should go to idle state again. Is something like this even possible?

And is there a method to toggle LEDs from another controller? So that if I press 4 on controller 1 both RGB LEDs turn the specific color.

Regards
Colin

Re: Toggle LED with multiple buttons

Posted: Mon Mar 14, 2022 15:58
by Victorus
Clear please. Led must be green on button 4 press duration or after it is released till second press? How do you want to connect controllers?

Re: Toggle LED with multiple buttons

Posted: Mon Mar 14, 2022 16:43
by verilyzed
Hi,
i've drawn a picture for you.
Each circle stands for a state and the ring is the color I want the LED 10 to be. Starting in idle (so LED is on blue) if I would press 4 the LED should turn green and REMAIN green until I press 4 again or I press 3 to switch into missle mode (red light). After every switch of state i want it to stay that light.

Re: Toggle LED with multiple buttons

Posted: Tue Mar 15, 2022 10:41
by Victorus
Thanx. Interesting. Similar (IMHO) situation. viewtopic.php?f=25&t=6219
Will try yo solve yours this evening.

Re: Toggle LED with multiple buttons

Posted: Tue Mar 15, 2022 22:37
by Victorus
leds.jpg

Try. Idle - blue. Press and release Physical 16(equivalent logical 4) LED=green. Until next press 16 (->blue) OR press Phys. 12 (=logical 3) ->red. Until next press Phys. 12. If before 12 #16 was not pressed (idle), than from red to blue.
If before 12 #16 was pressed (idle, green), than from red to green. In this case press #16 -> idle, blue.