Martin Nawrath published an online tutorial for the Arduino Uno, "Arduino DDS Sinewave Generator" back in 2009. It works quite nicely. Here are my notes on the (solderless) breadboard layout for the low-pass filter that converts the PWM output to a nice smooth wave.
The numbers refer to the rows on the breadboard and the letters are the columns.
Component From To
Jumper Wire 1a (to oscilloscope)
47nF Capacitor 1b GND rail
270Ω Resistor 1c GND rail
4.7mH Inductor 1d 3a
100nF Capacitor 3b GND rail
4.7mH Inductor 3c 5a
47nF Capacitor 5b GND rail
270Ω Resistor 5c 7a
Jumper Wire 7b Arduino Digital 11
The potentiometer's wiper pin should be connect to the Arduino's Analog 0 (with the other pins on the potentiometer connected to the 5V & GND on the Arduino), as indicated in the tutorial.
I didn't have any inductors around, so I ordered an assortment from an Amazon merchant. It arrived from China in less than 2 weeks. Mouser also has various types of what they call "Fixed Inductors 4700uH" available. I have tried Mouser Part #s 434-SMCC-472J-00 and 871-B78108S1475J. They both work fine.
On the Arduino Web site there is a nice tutorial, "Simple Waveform Genetator (sic) with Arduino Due." It presents code that generates sine, triangle, saw-tooth, and square waves. No external filter is required since it uses the Due's built-in DAC.
There is one small error in the code given that needs to b corrected.
Change the line
sample = constrain(t_sample, 0, oneHzSample);
sample = constrain(sample, 0, oneHzSample);