added base code for Arduino