Arduino Mega2560 R3 pinouts photo

Run it thru an RC lowpass filter.
Here's PWM, from 0-25-50-75-100-125-150-175-200-225-250 with 10K resistor and 4.7uF cap.
Or may 4.7K resistor and 10uF cap, I forget which.
http://sim.okawa-denshi.jp/en/CRlowkeisan.htm

You may want different values depending on what frequency response you want to achieve.