Preview:
  // Challenge Solution - Part #1
  // Cascading "if" statement to turn switches "ON" if they are "OFF"
  // The PULLUP configuration means that a "LOW" signal equals the switch being "ON",
  // while a "HIGH" signal equals the switch being in the "OFF" position
  if (digitalRead(sw1Pin) == HIGH) {
    delay(250);
    flipSwitch(sw1Pos);
  } 
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter