Autonomous Programming Repeating a Loop

Has anyone had any luck using 2 LEDs as a sequence selection? I am thinking about 1 LED as our ‘Go’ button and a second LED that would essentially reload the sequence in case the program was not successful.

Hit Go LED - First step successful!
Hit Go LED - Begins second step


Hit Go LED - First step not successful
Hit 2nd LED - Repeats First step, this time it is successful

I can’t quite figure out the looping required. Thinking that using a forever loop, some waits and a break command may get there.
Hit Go LED - Second step begins

What are you programming in? VexCode? RMS? RobotC Text? RobotC graphical?

I made a example program in RobotC graphical. It should be easy to port into your language.

image The code. (Unzip Me).zip

1 Like

Using VexCode IQ Blocks as per the forum.

Thanks for the sample, I will see if we can port it to our language.

Oh, sorry. I don’t have VEX vide blocks, so I can’t give you a demo project for it though…

No worries, this is a good start. I will let you know how it goes

1 Like

Do you understand what every line in the code is for? If not ask me :stuck_out_tongue:

I don’t think many of the blocks you used are in VEXCode Blocks

1 Like

Yes, but the point is the same, and different blocks could be used, that do the same thing. If you want to know what a block does, ask.

1 Like