Generating Square Wave with with modulated carrier frequency

nehe_bhimaji:
Dear Sir
I Have tried your modified sketch result is like that

  1. When Switch D2 Pressed I get Square wave roughly 18 KHZ but nothing change while POT varies from 0 to 100%
    its image is attached
    2.When Switch D2 Open I get some Notches in wave its image is attached

I have also check the Pot input at A0 input it seems from 0 to 5V varying while POT turns from 0 to 100%
Please suggest necessary changes in sketch.If possible explain sketch in details so that I will think on it
Thanks

Please go through following you tube link .There is Video of waveforms that I expect from Arduino UNO
http://youtu.be/fcaQiYgS3Ts
Thanks