Fritzing Creator Kit - #04 Flip Flop
Switch the LEDs on and off with a button.
The circuit is made up of two LEDs with series resistors and a push-button with a pull-up resistor.
Digital inputs, such as a push-button, are connected to the GND and to a digital pin on the Arduino board. At the same time, a resistor (pull-up resistor) is connected between the Arduino's digital pin and the +5 V. It deflects electrical interference when the button is not pressed. When the button is pressed, the Arduino pin is connected to GND (LOW), when it is open, there is a connection through the resistor to the +5 V (HIGH).