How to make an oscillator for AM Radio with Arduino?

The Arduino could e.g. turn the rotary capacitor for frequency tuning.

Producing square waves is feasible with the timers.