Turns on and off a light emitting diode(LED) connected to digital pin 13, when pressing a pushbutton attached to pin 2. const int buttonPin = 2; // the number of the pushbutton pin const int ledPin = ...
Purpose: Print whether a button is pressed or not. Notes : Version with resistor (Pressed -> 1, Not Pressed -> 0). Refer to the correct diagram.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results