Complete write code on arduino side