arduino master implementation