I would like to use a 4 LED pattern written line by line to work with a button, onboard or off board doesn't matter, the switch to another pattern using the same button. I am new to all of this stuff, mostly with a little knowledge of building and playing with the components, I am always lost when it comes to programming. I just need a general idea of how to switch from one pattern to the next.
I'd like the sequence to start with this:
// byTwos
while (true)
{
led1.Write(true);
led2.Write(false);
led3.Write(false);
led4.Write(true);
Thread.Sleep(100);
led1.Write(false);
led2.Write(true);
led3.Write(true);
led4.Write(false);
Thread.Sleep(100);
}