One of our favorite nuances of the C programming language (and its descendants) is the static keyword. It’s a little bit tricky to get your head around at first, because it can have two (or three) subtly different applications in different situations, but it’s so useful that it’s worth taking the time to get to know.
And before you Arduino users out there click away, static variables solve a couple of common problems that occur in Arduino programming. Take this test to see if it matters to you: will the following Arduino snippet ever print out “Hello World”?
void loop()
{
int count=0;
count = count + 1;
if (count > 10) {
Serial.println("Hello World");
}
}
Continue reading “Embed With Elliot: The Static Keyword You Don’t Fully Understand”











