When configuring globals to be either on or off (i.e. only two conditions) such as the "isEnabled" global mentioned above. You might want to instead use a
#define ISENABLED 1 // instead of defining a global
//later in the program put
#ifdef ISENABLED
//put autonomous code here
#endif
This page is a good tutorial on using MACROS,
http://vergil.chemistry.gatech.edu/r...al/basic2.html