Generate Control Voltage for a modular synth

Actually, I think it's working now. What I neglected to mention was that I was trying to output in the audio domain -- I was hoping I could digitalWrite out a sawtooth wave at audio frequencies, and the arduino just isn't fast enough to do it. (There go my dreams of making a wavetable synth.)

When I gave that up and tried generating control voltages, it seems to work ok.

By turning a pot I was able control the pitch of a VCO with the CV the arduino generated.

void loop() {
  k = analogRead( 0 )/4;
  for( i = 0; i < 1000; i++ ) {
    analogWrite( 3, k );  
  }
}

Now I'm not sure that it's giving me the full 0-5V range, but I'll have to play with that more tomorrow.