avatar

jdtwood

Member Since: November 29, 2011

Country: United States

  • 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.