Arduino sketches and diagram