RC2019 – While-loop assignment – 2

Explanation: The while-loop repeats executing the code inside it, until the condition (switchValue < 1) is met. For each repetition, the swithValue is updated, by reading the signal on switchPin. Note that due to the 1 second delay, very brief and quick clicks on switch, might not be registered.