Toggle LED with multiple buttons

Moderator: AdminGroup

verilyzed
Posts: 2
Joined: Sun Mar 13, 2022 23:40

Toggle LED with multiple buttons

Postby verilyzed » Sun Mar 13, 2022 23:48

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

User avatar
Victorus
Posts: 1729
Joined: Wed Sep 21, 2011 13:25
Has thanked: 401 times
Been thanked: 265 times

Re: Toggle LED with multiple buttons

Postby Victorus » Mon Mar 14, 2022 15:58

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?
Руководство пользователя по контроллерам VKB (VKB controllers User Guide) Ru&En
https://disk.yandex.ru/d/LlqiYtIrIetBOQ

verilyzed
Posts: 2
Joined: Sun Mar 13, 2022 23:40

Re: Toggle LED with multiple buttons

Postby verilyzed » Mon Mar 14, 2022 16:43

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.
Attachments
Graphic.png

User avatar
Victorus
Posts: 1729
Joined: Wed Sep 21, 2011 13:25
Has thanked: 401 times
Been thanked: 265 times

Re: Toggle LED with multiple buttons

Postby Victorus » Tue Mar 15, 2022 10:41

Thanx. Interesting. Similar (IMHO) situation. viewtopic.php?f=25&t=6219
Will try yo solve yours this evening.
Руководство пользователя по контроллерам VKB (VKB controllers User Guide) Ru&En
https://disk.yandex.ru/d/LlqiYtIrIetBOQ

User avatar
Victorus
Posts: 1729
Joined: Wed Sep 21, 2011 13:25
Has thanked: 401 times
Been thanked: 265 times

Re: Toggle LED with multiple buttons

Postby Victorus » Tue Mar 15, 2022 22:37

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.
Руководство пользователя по контроллерам VKB (VKB controllers User Guide) Ru&En
https://disk.yandex.ru/d/LlqiYtIrIetBOQ


Return to “Technical Support”

Who is online

Users browsing this forum: Bing [Bot] and 17 guests