Tutorial by Examples

This example uses a push button (tact switch) attached to digital pin 2 and GND, using an internal pull-up resistor so pin 2 is HIGH when the button is not pressed. const int LED_PIN = 13; const int INTERRUPT_PIN = 2; volatile bool ledState = LOW; void setup() { pinMode(LED_PIN, OUTPUT); ...

Page 1 of 1