Improving mochad driver with motion sensors and states