created master and slave code for arduino