Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Version published after converting to the new editor

Task

Modify your blinky program such that it blinks only when the switch is turned ON.

Hint

  • In setup(), pinMode(2, INPUT); should be inserted.
  • Place the code for blinking the LED below // do something in the code in Using Digital Input section.