×

SparkFun Electronics will be closed on July 3rd, 2015 in observance of Independence Day. Any orders placed after 2:00pm MT on July 2nd will be shipped out after the weekend. Thanks!

avatar

jdtwood

Member Since: November 29, 2011

Country: United States

Profile

Programming Languages

C/C++, Perl, Python

Universities

Yale University

Websites

http://jdtwood.com

  • You’re correct.

    From http://arduino.cc/en/Reference/Volatile:

    A variable should be declared volatile whenever its value can be changed by something beyond the control of the code section in which it appears, such as a concurrently executing thread. In the Arduino, the only place that this is likely to occur is in sections of code associated with interrupts, called an interrupt service routine.