updated arduino code for testing