]> git.piffa.net Git - arduino/blob - books/ArduinoNextSteps-master/ArduinoNextSteps/sketch_03_01_interrupt/sketch_03_01_interrupt.ino
first commit
[arduino] / books / ArduinoNextSteps-master / ArduinoNextSteps / sketch_03_01_interrupt / sketch_03_01_interrupt.ino
1 // sketch 03_01_interrupts
2
3 int ledPin = 13;
4
5 void setup()
6 {
7   pinMode(ledPin, OUTPUT);
8   attachInterrupt(0, stuffHapenned, FALLING);
9 }
10
11 void loop()
12 {
13 }
14
15 void stuffHapenned()
16 {
17   digitalWrite(ledPin, HIGH);
18 }