Files

copied
Last update 2 years 9 months by eddyluursema
FilesSpeedometerinterruptTest
..
interruptTest.ino
interruptTest.ino
const byte ledPin = 13; const byte interruptPin = 3; volatile byte state = LOW; void setup() { pinMode(ledPin, OUTPUT); pinMode(interruptPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE); } void loop() { digitalWrite(ledPin, state); } void blink() { state = !state; }
Report a bug