arduino code for mdp