Control code for arduino
merged changes for control code