added arduino gate code