VEX IQ Program with LEDs

How do you program an LED light to run many programs? For example, when you press an LED and it pushes the first riser in, and you bring it back to the starting position and press it again and then it pushes in the second riser.

There are a number of tutorial examples on how to use the button. You will check the button until it’s pushed and then you do your routine. Post what language you want to use.


I want to use VEXcode IQ blocks.

image Here is a sample program that I made real quick. All it does is it waits for the TouchLED to be pressed before it continues to the next lines of code.

You can think of a “wait until” command as a stop sign. You cannot continue the program and execute the lines below it if you haven’t stopped a the stop sign, and then pressing the touch led acts as hitting the gas to start driving forwards again.


it might be kinda blurry, so the wait until blocks is just:
wait until (TouchLED Pressed)


Thanks, I’ll try that!

I just run two different led’s.

1 Like

I have 4 programs to do in one match, so I don’t think I could use 4 LEDs.

1 Like

Just use the same thing @Connor_Howard said to use after every chunk of code you want to run.