added the rest of the arduino code