Learn-Arduino-via-simulations

Use push button as a normal on off switch

Previously, we saw the use of a push button where as long as the button was pressed, the LED was on and it turned off as soon as the button was released.

Make use of a push button as a normal switch:

  1. If pushed once, the LED will be turned on and will remain turned on after releasing the button.
  2. The next time the button is pushed, the LED will turn off and will remain turned off even after releasing the button.

That is the state of LED changes every time the button is pushed.