an antenna for a wireless device may be kept dynamically tuned to a desired center frequency to compensate for detuning which may be caused by environmental influences . a sensor provides a feedback signal to a controller to select an appropriate capacitance value from a variable capacitor to tune the antenna for the wireless device . the variable capacitor may comprise a plurality of fixed capacitors and mems switches arranged in parallel or may comprise a variable mems capacitor having a fixed lower plate and a flexible upper plate .