Added code for Arduino. Needs to change