This Arduino code defines an LED connected to pin 13 and a pushbutton connected to pin 2, sets their pins as output and input in setup(), and uses a digitalRead in loop() to check if the pushbutton is pressed, turning the LED on if so and off if not.
This Arduino code defines an LED connected to pin 13 and a pushbutton connected to pin 2, sets their pins as output and input in setup(), and uses a digitalRead in loop() to check if the pushbutton is pressed, turning the LED on if so and off if not.
This Arduino code defines an LED connected to pin 13 and a pushbutton connected to pin 2, sets their pins as output and input in setup(), and uses a digitalRead in loop() to check if the pushbutton is pressed, turning the LED on if so and off if not.