I don't think a rectangular wave can propagate through the ether :)
Output from the digital pin is very rectangular. But you have many sinusoidal harmonics ready to be fired into the air if you plug a small antenna on it.
Totally of topic, but I think it might be interesting and new for some of the HN crowd: both Lagrange and Laplace, not the least of mathematicians, didn't believe that idea when Fourier presented it to the Paris institute. http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Four...:
"[...] a committee consisting of Lagrange, Laplace, Monge and Lacroix was set up to report on the work. Now this memoir is very highly regarded but at the time it caused controversy.
There were two reasons for the committee to feel unhappy with the work. The first objection, made by Lagrange and Laplace in 1808, was to Fourier's expansions of functions as trigonometrical series, what we now call Fourier series. Further clarification by Fourier still failed to convince them. As is pointed out in [4]:-
All these are written with such exemplary clarity - from a logical as opposed to calligraphic point of view - that their inability to persuade Laplace and Lagrange ... provides a good index of the originality of Fourier's views."
> I don't think a rectangular wave can propagate through the ether ...
Of course it can. A square wave is just a series of discrete sine components, each of which will happily propagate through the air. If this were not true, WiFi wouldn't work -- it also relies on multiple, coordinated frequencies and complex modulation.
Right, in ideal hardware. The problem is that in order to transmit an ideal square wave, you need infinite bandwidth.
The problem being that any real circuit has a finite band it operates on. It will filter the components of the wave that are outside of its bandwidth, leading to 'ringing' artifacts (Gibbs phenomenon).
In other words, there's enough energy to cause problems at 2, 6, 10 ... times f, but at rapidly declining levels.
> It will filter the components of the wave that are outside of its bandwidth, leading to 'ringing' artifacts ...
Ringing artifacts are present in a system whose bandwidth rolls off abruptly. It's less significant in a system with a gradual drop-off in response, like a piece of wire acting as a broadband antenna.
I don't doubt that the spectrum coming out of that thing is pretty horrific. There are no filters, and who knows what the wave form is (rectangular?).