C code for analog writing on the arduino