Last active
June 10, 2016 05:16
-
-
Save futureshocked/53f24f97c3852b77d5cc030a2852810c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volatile int a; //A variable which is also access by an interrupt service routine | |
void loop(){ | |
a = 1; | |
int b; | |
b = a + 1; | |
Serial.println(b); | |
} | |
void isr0 () { | |
detachInterrupt(0); | |
a = 5; | |
attachInterrupt (0, isr0, RISING); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment