...
Using a pull-up or pull-down resistor ensures that we have with a HIGH or LOW value at the pin. Without, we would have a floating value. Always use a pull-up or pull-down with a button to ensure state.
References
Reference | URL |
---|---|
Spark Fun - Pull Up Resistors | https://learn.sparkfun.com/tutorials/pull-up-resistors |
...