Code for AMU controller including all functionalities of the control unit