Arduino interface code