Integrating an electronic processing unit with a micromechanical structure