I’ve read the reference on the volatile variable qualifier but am unclear about the implications.
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.
Does this mean that any variable that can change both within and outwith an ISR should be volatile?
And if so, does that apply to all variable types?