Only certain pins can be used for AnalogWrite. A0 is not one of them. analogWrite() - Arduino Reference
Thank you very much for that, it explains a lot. However, reading that page it appears that the analogWrite function works with PWM. Doesn't that mean that reading the signal will simply result in another square wave with the frequency varying with the amplitude of the sine wave I try to send? If so, does that mean I have to use a whole bunch of pins to make a DAC or is there another way to produce the signal I'm looking for?