MEMS-based optical mini- and microspectrometers for the visible and infrared spectral range