int relay = 12;//connect relay to digital pin 12 of Arduino) int button = 11;//push button to digital pin 11 of Arduino(connet a 10 K resiter to Ground keep it PULLDOWN pinMode(button, INPUT);//Pin 11 ...
This project illustrates how to control an LED with a push button connected to an Arduino board. Pressing the button will toggle the LED on and off, making it an excellent introductory project for ...