Highest PWM frequency output for the Uno/Nano

Thanks for the great sketch and information. I am having trouble understanding your sketch, maybe because I am fairly new to Arduino/C++. What I am trying to do is utilize the output from your sketch as a loop antenna that I can then detect by a secondary coil or loop. No need for accuracy, just detection of proximity. Can you advise where/how I get your output? Thanks very much.