Micro-electro-mechanical systems (MEMS) are miniaturized embedded systems comprising micromachined elements and electronic parts. Micromachined elements often work thanks to mechanical principles and/or electrical and optical functionalities. MEMS is also a technology portfolio of processes to fabricate miniaturized systems. One of the most known examples of MEMS is the accelerometer, a sensor that is currently used in every smartphone. The accelerometer comprises a suspended mass held by springs and free to move, this is the mechanical part of the MEMS. When subjected to an acceleration, this mass moves with respect to a fixed frame. The change of position with respect to the reference frame induces a change of one of the electrical properties of the sensor, such as its electric capacitance or resistance. This change can be measured by an electronic circuit in order to compute the incoming acceleration. MEMS are now widely used in the electronic industry and can be found in most of the objects of our daily life. For instance, in our phone we can find: an accelerometer, e-compass, gyroscope, radio-frequency filter, microphone; they all rely on MEMS technology. Nano-electro-mechanical systems (NEMS) are smaller than MEMS and work at the nanoscale; NEMS are still mainly under development in research laboratories.