Concept Flow - Button reading with pull-up resistor
Setup pinMode INPUT_PULLUP
Read digital pin state
Is button pressed?
Button LOW
Take action
Repeat
The Arduino sets the button pin as input with pull-up resistor, reads the pin state, and checks if the button is pressed (LOW) or not (HIGH).
