The controller activates the alarm when carbon dioxide or other gases fall outside pre-selected parameters, such as specific carbon dioxide levels, specific frequency or amplitude of inhalation or exhalation, and/or specific changes in the frequency or amplitude of carbon dioxide levels as the subject respires.