A Fabry-Perot cavity has a pair of partially transmissive, partially
reflective, surfaces. A first of the surfaces is flexibly suspended
adjacent and parallel to a second of the surfaces. A gap exists between
the surfaces. A variable electrostatic potential permits this gap to be
adjusted. A translucent chemical layer is disposed on the first surface.
A photosensor is attached to the second surface. Light irradiates the
photosensor through the chemical layer and the first and second surfaces
wherein the light is also partially reflected between the surfaces. A
sensing environment is provided wherein an agent undergoes a reaction
with the chemical layer as well as an environment wherein the reaction
does not occur. The output of the photosensor is measured to assess a
change in spectrum and spectral intensity for each of the sensing
environments. The gap between the surfaces as well as the light used are
selected to provide an optimum photosensor output.