Skip to content

Instantly share code, notes, and snippets.

@futureshocked
Created June 10, 2016 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save futureshocked/8c05aca012ac1f4d6e1bba8b772c27c5 to your computer and use it in GitHub Desktop.
Save futureshocked/8c05aca012ac1f4d6e1bba8b772c27c5 to your computer and use it in GitHub Desktop.
static int local_variable = 0;
void setup(){
Serial.begin(9600);
}
void loop (){
a_function();
Serial.print("In loop: ");
Serial.println(local_variable);
delay(1000);
}
void a_function(){
Serial.print("In a_function: ");
Serial.println(local_variable);
local_variable++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment