Ramp, saw-tooth wave genrator code & connection needed

Are you aware that anaolg output on an arduino pin is pulse-width modulated? It won't be a real sawtooth - you'll have to filter it.