Towards embedded control for resonant scanning MEMS micromirror