Here, when the button pressed, the 5v will be sent to pin 2. There's another way to set up a button, which would use the Arduino's internal pull up resistor. Here is ...
This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a digital input on pin 2 and prints the results to the serial monitor. /* Input Pull-up Serial This example demonstrates the use of ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results